Skip to content

Commit

Permalink
auto release
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBoatyMcBoatFace committed Aug 10, 2023
1 parent 4b3560d commit 1981ff7
Showing 1 changed file with 48 additions and 3 deletions.
51 changes: 48 additions & 3 deletions .github/workflows/auto-version.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# .github/workflows/auto-version.yml
# Resources: https://github.com/marketplace/actions/git-semantic-version#git-based-semantic-versioning
# Resources:
# https://github.com/marketplace/actions/git-semantic-version#git-based-semantic-versioning
# https://github.com/marketplace/actions/sentry-release
# https://github.com/marketplace/actions/create-release
# Auto-generates version for commits

name: Auto Versioning
name: Auto Versioning and Release

on:
push:
Expand All @@ -26,7 +29,7 @@ jobs:
tag_prefix: "v"
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"
# Add any other needed parameters here
# Additional parms here...

- name: Print new version
run: echo "New version is ${{ steps.version.outputs.version }}"
Expand All @@ -42,3 +45,45 @@ jobs:
git push origin v${{ steps.version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}

outputs:
version: ${{ steps.version.outputs.version }}

create-release:
needs: versioning
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Create Release
uses: ncipollo/release-action@v1.12.0
with:
artifacts: "" # You can specify the artifacts to upload here
body: "Auto-generated release from v${{ needs.versioning.outputs.version }}"
name: "Release v${{ needs.versioning.outputs.version }}"
tag: "v${{ needs.versioning.outputs.version }}"
token: ${{ secrets.BOT_TOKEN }}

configure-sentry:
needs: create-release
name: Configure Sentry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
with:
environment: production

0 comments on commit 1981ff7

Please sign in to comment.