-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e67bdf
commit 15284d9
Showing
2 changed files
with
85 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,84 @@ on: | |
- prod | ||
- add_techchecks_page | ||
jobs: | ||
deploy: | ||
versioning: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch all history and tags | ||
|
||
- name: Generate Semantic Version | ||
id: version | ||
uses: PaulHatch/[email protected] | ||
with: | ||
tag_prefix: "v" | ||
major_pattern: "(MAJOR)" | ||
minor_pattern: "(MINOR)" | ||
# Additional parms here... | ||
|
||
- name: Print new version | ||
run: echo "New version is ${{ steps.version.outputs.version }}" | ||
|
||
- name: Configure Git user | ||
run: | | ||
git config user.name "${{ secrets.BOT_NAME }}" | ||
git config user.email "${{ secrets.BOT_EMAIL }}" | ||
- name: Tag the new version | ||
run: | | ||
git tag v${{ steps.version.outputs.version }} | ||
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/[email protected] | ||
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 | ||
|
||
deploy-ghost: | ||
runs-on: ubuntu-22.04 | ||
needs: configure-sentry | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Deploy Ghost Theme | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters