From df1865bca84fb902c99aad031f22b0f0bdaa865c Mon Sep 17 00:00:00 2001 From: Theo Beers Date: Tue, 26 May 2026 10:44:29 -0400 Subject: [PATCH] update ci/cd, add test workflow --- .../workflows/{main.yml => tag-release.yml} | 17 ++++++------- .github/workflows/test.yml | 24 +++++++++++++++++++ 2 files changed, 33 insertions(+), 8 deletions(-) rename .github/workflows/{main.yml => tag-release.yml} (51%) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/main.yml b/.github/workflows/tag-release.yml similarity index 51% rename from .github/workflows/main.yml rename to .github/workflows/tag-release.yml index ab385e9..40a1a39 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/tag-release.yml @@ -1,21 +1,22 @@ -name: Tag Releases +name: Tag release on: push: - branches: - - "main" - paths: - - "version.txt" + branches: [main] + paths: [version.txt] - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +permissions: + contents: write + jobs: - build: + tag: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 + - run: | VERSION="$(cat version.txt)" git tag "$VERSION" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4818742 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: Run tests + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + + - uses: actions/setup-go@v6 + with: + go-version-file: go.mod + + - run: go test ./...