Skip to content

Commit

Permalink
add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
okkdev committed Jun 25, 2024
1 parent 732017e commit c456f8f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: release

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: "26"
gleam-version: "1.2.0"
- 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 --target erlang
# - run: gleam test --target javascript
- run: gleam publish -y
env:
HEXPM_USER: ${{ secrets.HEX_USERNAME }}
HEXPM_PASS: ${{ secrets.HEX_PASSWORD }}

- uses: softprops/action-gh-release@v1

0 comments on commit c456f8f

Please sign in to comment.