Skip to content

Commit

Permalink
add release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
versecafe committed Aug 9, 2024
1 parent 6461199 commit cd73899
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: release

on:
push:
tags: ["v*"]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: erlef/[email protected]
with:
otp-version: "26.0.2"
gleam-version: "1.4.1"
rebar3-version: "3"

- 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
- run: gleam format --check src test
- run: gleam test
- run: gleam publish -y
env:
HEXPM_USER: ${{ secrets.HEX_USERNAME }}
HEXPM_PASS: ${{ secrets.HEX_PASSWORD }}

- uses: softprops/action-gh-release@v1
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
otp-version: "26.0.2"
gleam-version: "1.4.1"
rebar3-version: "3"
# elixir-version: "1.15.4"
- run: gleam deps download
- run: gleam test
- run: gleam format --check src test

0 comments on commit cd73899

Please sign in to comment.