-
Notifications
You must be signed in to change notification settings - Fork 17
55 lines (50 loc) · 1.37 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: GH and Hex.pm Release
on:
push:
tags:
- v*.*.*
jobs:
test:
uses: ./.github/workflows/test.yml
version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo install tomlq
- run: |
if [ "v$(tomlq version -f gleam.toml)" == "${{ github.ref_name }}" ]; then
exit 0
fi
echo "tag does not match version in gleam.toml, refusing to publish"
exit 1
release-gh:
runs-on: ubuntu-latest
needs:
- test
- version
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: TanklesXL/gleam_actions/.github/actions/deps_cache@main
- name: Release
uses: softprops/action-gh-release@v1
release-hex:
runs-on: ubuntu-latest
needs:
- test
- version
steps:
- uses: actions/checkout@v4
- uses: TanklesXL/gleam_actions/.github/actions/deps_cache@main
- uses: TanklesXL/gleam_actions/.github/actions/install_gleam@main
with:
erlang_version: 27
gleam_version: 1.6.1
- uses: TanklesXL/gleam_actions/.github/actions/hex_publish@main
with:
hex_user: ${{ secrets.HEXPM_USER }}
hex_pass: ${{ secrets.HEXPM_PASS }}
hex_key: ${{ secrets.HEXPM_API_KEY }}