Skip to content

Commit

Permalink
updated metadata, added release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
massivefermion committed Feb 11, 2024
1 parent e25af58 commit b3a0a02
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 33 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: release

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

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: erlef/setup-beam@v1
with:
otp-version: '26.1'
gleam-version: '0.34.0'

- 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
name: check version
- run: gleam format --check

- run: gleam test

- run: gleam publish -y
env:
HEXPM_USER: ${{ secrets.HEXPM_USER }}
HEXPM_PASS: ${{ secrets.HEXPM_PASS }}

- uses: softprops/action-gh-release@v1
2 changes: 1 addition & 1 deletion gleam.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "phony"
version = "1.1.2"
version = "1.1.3"

links = [{ title = "Gleam", href = "https://gleam.run" }]
description = "An international phone number validator"
Expand Down
Loading

0 comments on commit b3a0a02

Please sign in to comment.