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