mirror of
https://github.com/sigmasternchen/gleam-community-maths
synced 2025-03-15 07:59:01 +00:00
update release action
This commit is contained in:
parent
009209253a
commit
bdfa77339a
1 changed files with 19 additions and 12 deletions
31
.github/workflows/release.yml
vendored
31
.github/workflows/release.yml
vendored
|
@ -5,27 +5,34 @@ on:
|
|||
tags: ["v*"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3.1.0
|
||||
- uses: erlef/setup-beam@v1.16.0
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: "26.0.2"
|
||||
gleam-version: "0.30.5"
|
||||
- run: cargo install tomlq
|
||||
otp-version: "26.1"
|
||||
gleam-version: "0.32.4"
|
||||
|
||||
- run: |
|
||||
if [ "v$(tomlq version -f gleam.toml)" == "${{ github.ref_name }}" ]; then
|
||||
exit 0
|
||||
version="v$(cat gleam.toml | grep -m 1 "version" | sed -r "s/version *= *\"([[:digit:].]+)\"/\1/")"
|
||||
if [ "$version" != "${{ github.ref_name }}" ]; then
|
||||
echo "tag '${{ github.ref_name }}' does not match the version in gleam.toml"
|
||||
echo "expected a tag name 'v$version'"
|
||||
exit 1
|
||||
fi
|
||||
echo "tag does not match version in gleam.toml, refusing to publish"
|
||||
exit 1
|
||||
- run: gleam format --check src test
|
||||
name: check version
|
||||
|
||||
- run: gleam format --check
|
||||
|
||||
- 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
|
||||
- uses: softprops/action-gh-release@v1
|
||||
|
|
Loading…
Reference in a new issue