Skip to content

Commit

Permalink
Merge pull request #46 from map3xyz/fix/release
Browse files Browse the repository at this point in the history
fix: release, only tag if diff
  • Loading branch information
plondon authored Dec 23, 2022
2 parents a36a57d + f0d232c commit b83c16a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
steps:
- uses: actions/checkout@master
with:
branch: master
persist-credentials: false
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Setup Git
Expand All @@ -20,17 +21,23 @@ jobs:
run: |
yarn install
yarn build
- name: Check if there are changes
id: changes
uses: UnicornGlobal/[email protected]
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN }}
run: npx semantic-release
- name: Set version
if: steps.changes.outputs.changed == 'true'
run: echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Commit and push files
if: steps.changes.outputs.changed == 'true'
run: |
git commit -a -m "chore: release (${{ env.VERSION }})"
git push https://${{ secrets.BOT_ACCESS_TOKEN }}@github.com/map3xyz/payments-sdk HEAD:master --follow-tags
- name: Purge CDN jsDelivr cache
if: steps.changes.outputs.changed == 'true'
uses: gacts/purge-jsdelivr-cache@v1
with:
url: |
Expand Down

0 comments on commit b83c16a

Please sign in to comment.