Skip to content

Commit

Permalink
use latest actions setup
Browse files Browse the repository at this point in the history
  • Loading branch information
TanklesXL committed May 19, 2024
1 parent bc51170 commit bc676af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 46 deletions.
51 changes: 7 additions & 44 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: GH and Hex.pm Release

on:
push:
Expand All @@ -8,48 +8,11 @@ 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
- name: Release
uses: softprops/action-gh-release@v1

release-hex:
runs-on: ubuntu-latest
environment: publish
release:
needs:
- test
- version
steps:
- uses: actions/checkout@v4
- uses: TanklesXL/gleam_actions/.github/actions/deps_restore@main
- uses: erlef/setup-beam@v1
with:
otp-version: 26
rebar3-version: 3
gleam-version: 1
- run: gleam publish -y
env:
HEXPM_USER: ${{ secrets.HEXPM_USER }}
HEXPM_PASS: ${{ secrets.HEXPM_PASS }}
shell: bash
uses: TanklesXL/gleam_actions/.github/workflows/release.yaml@main
secrets: inherit
with:
hexpm_user: ${{ secrets.HEXPM_USER }}
hexpm_pass: ${{ secrets.HEXPM_PASS }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
uses: TanklesXL/gleam_actions/.github/workflows/test.yaml@main
with:
gleam_version: 1.1.0
node_enabled: false
erlang_enabled: true
test_node: false
test_erlang: true

0 comments on commit bc676af

Please sign in to comment.