diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 75ab003..708fe1a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,11 +1,10 @@ -name: Sanity check +name: Release on: - push - - pull_request jobs: - prcheck: + sanitycheck: name: Sanity check runs-on: ubuntu-latest steps: @@ -30,4 +29,29 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + release: + needs: sanitycheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.merge_commit_sha }} + fetch-depth: '0' + + - name: Bump version and push tag + id: version + uses: anothrNick/github-tag-action@1.64.0 + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + MAJOR_STRING_TOKEN: "major:" + MINOR_STRING_TOKEN: "minor:" + PATCH_STRING_TOKEN: "patch:" + + - name: Create Release + id: release + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.version.outputs.new_tag }} + token: ${{ secrets.RELEASE_TOKEN }} \ No newline at end of file