Skip to content

Commit

Permalink
💚 Update CI and publish actions
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomocavalieri committed Jan 20, 2025
1 parent 30392e5 commit cb50183
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 51 deletions.
57 changes: 10 additions & 47 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,13 @@ on:
- 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 }}
release:
uses: TanklesXL/gleam_actions/.github/workflows/release.yaml@5c5d99b6d80e097f6eaf7daffa63bf446ca7d5ea
secrets:
HEXPM_USER: ${{ secrets.HEXPM_USER }}
HEXPM_PASS: ${{ secrets.HEXPM_PASS }}
with:
gleam_version: 1.7.0
erlang_version: 27
test_erlang: true
test_node: false
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: TanklesXL/gleam_actions/.github/actions/install_gleam@main
with:
gleam_version: 1.6.1
gleam_version: 1.7.0
erlang_version: 27
- uses: TanklesXL/gleam_actions/.github/actions/format@main

Expand All @@ -24,11 +24,11 @@ jobs:
- uses: actions/checkout@v4
- uses: TanklesXL/gleam_actions/.github/actions/install_gleam@main
with:
gleam_version: 1.6.1
gleam_version: 1.7.0
erlang_version: 27
- uses: TanklesXL/gleam_actions/.github/actions/deps_cache@main
with:
gleam_version: 1.6.1
gleam_version: 1.7.0

test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- uses: TanklesXL/gleam_actions/.github/actions/deps_cache@main
- uses: TanklesXL/gleam_actions/.github/actions/install_gleam@main
with:
gleam_version: 1.6.1
gleam_version: 1.7.0
erlang_version: ${{ matrix.erlang }}
- name: "integration test"
run: ./integration_test

0 comments on commit cb50183

Please sign in to comment.