Merge pull request #66 from zesty-io/feat/2479-custom-roles #44
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
name: Release | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
name: Deployment | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Configure git to commit and push to main | |
- name: Setup GIT | |
run: | | |
git switch -c version-branch | |
git config user.email "[email protected]" | |
git config user.name "$GITHUB_ACTOR" | |
- name: Install Dependencies | |
run: npm install --force --prefer-offline --no-audit | |
- name: "Build dist folder" | |
run: npm run build | |
- name: Update & Push | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
run: | | |
git add . | |
git commit --allow-empty -m ":rocket: chore: deploy and bump version " | |
npm version patch | |
git push origin version-branch:main | |
# Create Release | |
- name: Release | |
uses: justincy/[email protected] | |
id: release | |
- name: Print release output | |
if: ${{ steps.release.outputs.released == 'true' }} | |
run: echo Release ID ${{ steps.release.outputs.release_id }} | |
# Purge cdn cache | |
- uses: gacts/purge-jsdelivr-cache@v1 | |
with: | |
url: | | |
https://cdn.jsdelivr.net/gh/zesty-io/fetch-wrapper@latest/dist/index.js |