diff --git a/.gitea/workflows/build-and-release.yml b/.gitea/workflows/release.yml similarity index 54% rename from .gitea/workflows/build-and-release.yml rename to .gitea/workflows/release.yml index 98c7f5f..d6c27b4 100644 --- a/.gitea/workflows/build-and-release.yml +++ b/.gitea/workflows/release.yml @@ -1,24 +1,38 @@ -name: Build and Release +name: Create Version Tag on: push: - tags: - - "v*" + branches: + - main + - "prerelease-*" jobs: - build: + version-check: + runs-on: ubuntu-latest + outputs: + tag_created: ${{ steps.tag.outputs.tag_created }} + tag_name: ${{ steps.tag.outputs.tag_name }} + steps: + - uses: actions/checkout@v4 + - name: Run version check + id: tag + uses: https://git.cyborggrizzly.com/bearmetal/ci-actions/version-check@v1 + + build-release: + if: needs.version-check.outputs.tag_created == 'true' + needs: version-check runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Build and release binaries - uses: https://git.cyborggrizzly.com/bearmetal/ci-actions/deno-publish@main + uses: https://git.cyborggrizzly.com/bearmetal/ci-actions/deno-release@main with: entrypoint: main.ts compile-flags: "--allow-read --allow-write --allow-env --allow-net" env: GITEA_TOKEN: ${{ secrets.GIT_PAT }} - publish: + publish-release: needs: build runs-on: ubuntu-latest steps: diff --git a/.gitea/workflows/tag-cli.yml b/.gitea/workflows/tag-cli.yml deleted file mode 100644 index 25cad8b..0000000 --- a/.gitea/workflows/tag-cli.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Create Version Tag - -on: - push: - branches: - - main - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: https://git.cyborggrizzly.com/bearmetal/ci-actions/version-check@v1