README.md 1.51 KB
Newer Older
Luc Didry's avatar
Luc Didry committed
1
2
3
4
5
6
# Pouet it from CI

This software is used for automatically tooting from Gitlab CI when creating a new tag.

## How to use?

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
First, get credentials for your app with the [register-app](https://framagit.org/fiat-tux/hat-softwares/mastodon/register-app) script.

With those credentials, in the CI settings of your project, create the following protected variables:
- `CLIENT_ID`
- `CLIENT_SECRET`
- `ACCESS_TOKEN`
- and create a `HOST` protected variable, containing the hostname of your Mastodon instance.

Then protect all your tags in the repository settings by creating a `*` wildcard.

Finally, add this to your `.gitlab-ci.yml`:
```
pouet-it:
  image: hatsoftwares/pouet-it-from-ci:latest
  script:
    - cd /opt/pouet-it-from-ci
23
    - export MESSAGE=$(echo -e "I just released a new version of ${CI_PROJECT_NAME} !\n${CI_PROJECT_URL}/tags/${CI_COMMIT_TAG}")
24
25
26
27
28
29
    - carton exec ./pouet-it-from-ci.pl
  only:
    - tags
```

And that should be all.
Luc Didry's avatar
Luc Didry committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43

## License

GPLv3, see the [LICENSE](LICENSE) file for details.

## Logo

The logo is the [mascot of Mastodon](https://commons.wikimedia.org/wiki/File%3AMastodon_Mascot_%28Alternative%29.png)

## Author

[Luc Didry](https://fiat-tux.fr). You can support me on [Tipeee](https://tipeee.com/fiat-tux) and [Liberapay](https://liberapay.com/sky).

[![Tipeee button](https://framagit.org/luc/last/raw/master/themes/default/img/tipeee-tip-btn.png)](https://tipeee.com/fiat-tux) [![Liberapay logo](https://framagit.org/luc/last/raw/master/themes/default/img/liberapay.png)](https://liberapay.com/sky)