Skip to content

Commit

Permalink
New check lib version for publish
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnBjrk committed Mar 16, 2024
1 parent 47c5edf commit 6286af3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
18 changes: 7 additions & 11 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,14 @@ runs:
otp-version: ${{ inputs.erlang-version }}
gleam-version: ${{ inputs.gleam-version }}
rebar3-version: ${{ inputs.rebar-version }}
- uses: aslilac/setup@v1
with:
archives: |
https://mckayla.cloud/tomlq-linux-x64.tar.gz
- run: |
if [ "v$(tomlq version -f gleam.toml)" == "${{ github.ref_name }}" ]; then
exit 0
- name: check version
run: |
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
shell: bash
- run: gleam publish -y
shell: bash
env:
Expand Down
2 changes: 1 addition & 1 deletion gleam.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "gap"
gleam = ">= 1.0.0"
version = "1.1.1"
version = "1.1.2"
description = "A Gleam library for comparing strings/lists and producing a textual (styled) representation of the differences."

# Fill out these fields if you intend to generate HTML documentation or publish
Expand Down

0 comments on commit 6286af3

Please sign in to comment.