From 19bc5f60413aabd21d19bb20d14e956b0f44ccd3 Mon Sep 17 00:00:00 2001 From: McKayla Washburn Date: Thu, 9 Nov 2023 19:42:33 -0700 Subject: [PATCH] update + actions --- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 4 ++-- gleam.toml | 6 +++--- manifest.toml | 8 ++++---- 4 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6f83824 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: release + +on: + push: + tags: ["v*"] + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: erlef/setup-beam@v1 + with: + otp-version: "26.1" + gleam-version: "0.32.4" + + - 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.HEX_USERNAME }} + HEXPM_PASS: ${{ secrets.HEX_PASSWORD }} + + - uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2c2a7d4..7c3479c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,8 +19,8 @@ jobs: - uses: erlef/setup-beam@v1 with: - otp-version: "26.0" - gleam-version: "0.29.0" + otp-version: "26.1" + gleam-version: "0.32.4" - run: gleam format --check diff --git a/gleam.toml b/gleam.toml index 9164735..6785221 100644 --- a/gleam.toml +++ b/gleam.toml @@ -1,11 +1,11 @@ name = "gleam_community_path" -version = "1.0.0" +version = "0.1.0" licences = ["Apache-2.0"] description = "Path parsing and manipulation" repository = { type = "github", user = "gleam-community", repo = "path" } [dependencies] -gleam_stdlib = "~> 0.29" +gleam_stdlib = "~> 0.32" [dev-dependencies] -gleeunit = "~> 0.10" +gleeunit = "~> 1.0" diff --git a/manifest.toml b/manifest.toml index e745adc..34d109a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -2,10 +2,10 @@ # You typically do not need to edit this file packages = [ - { name = "gleam_stdlib", version = "0.29.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "24581B17879AA903B3E7531869D9460730C2F772A1C02C774ABF75710CCC4CFE" }, - { name = "gleeunit", version = "0.10.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "ECEA2DE4BE6528D36AFE74F42A21CDF99966EC36D7F25DEB34D47DD0F7977BAF" }, + { name = "gleam_stdlib", version = "0.32.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "07D64C26D014CF570F8ACADCE602761EA2E74C842D26F2FD49B0D61973D9966F" }, + { name = "gleeunit", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "D3682ED8C5F9CAE1C928F2506DE91625588CC752495988CBE0F5653A42A6F334" }, ] [requirements] -gleam_stdlib = "~> 0.29" -gleeunit = "~> 0.10" +gleam_stdlib = { version = "~> 0.32" } +gleeunit = { version = "~> 1.0" }