This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Delete automatically generated tag from release (#174)
* fix: Delete automatically generated tag from release * fix: fix
- Loading branch information
Showing
3 changed files
with
129 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 |
---|---|---|
@@ -0,0 +1,125 @@ | ||
name: Release Hook | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- 'package.json' | ||
branches: ['main'] | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
released: ${{ steps.persist_release.outputs.released }} | ||
changelog: ${{ steps.persist_release.outputs.changelog }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Cache pnpm modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.2 | ||
run_install: true | ||
|
||
- name: Automatic GitHub Release | ||
uses: justincy/[email protected] | ||
id: release | ||
|
||
- name: Publish | ||
if: steps.release.outputs.released == 'true' | ||
run: pnpm publish:npm | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Fetch Release | ||
if: steps.release.outputs.released == 'true' | ||
uses: cardinalby/git-get-release-action@v1 | ||
id: fetch_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
releaseId: ${{ steps.release.outputs.release_id }} | ||
|
||
- name: Output Release Changelog | ||
if: steps.release.outputs.released == 'true' | ||
run: echo "${{ steps.fetch_release.outputs.body }}" | ||
|
||
|
||
- name: Persist Release | ||
if: steps.release.outputs.released == 'true' | ||
id: persist_release | ||
env: | ||
RAW_CHANGELOG: ${{ steps.fetch_release.outputs.body }} | ||
REPO_URL: 'https://github.com/${{ github.repository }}' | ||
run: | | ||
echo "::set-output name=released::${{ steps.release.outputs.released }}" | ||
echo "::set-output name=changelog::$(node ./scripts/rewrite-changelog.js RAW_CHANGELOG $REPO_URL)" | ||
bump_zapper_studio: | ||
name: Bump on Zapper API | ||
needs: [release] | ||
runs-on: ubuntu-latest | ||
if: ${{ needs.release.outputs.released == 'true' }} | ||
strategy: | ||
matrix: | ||
repository: [Zapper-fi/zapper-api] | ||
steps: | ||
- name: Checkout ${{ matrix.repository }} | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ matrix.repository }} | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_ZAPPER_BOT }} | ||
ref: master | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.2 | ||
run_install: true | ||
|
||
- name: Upgrade dependencies | ||
run: | | ||
pnpm up @zapper-fi/studio@latest | ||
- name: Set Target Branch | ||
id: set_target_branch | ||
run: | | ||
TARGET_BRANCH=bump-zapper-studio | ||
echo "::set-output name=target_branch::$TARGET_BRANCH" | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
token: ${{ secrets.GH_ZAPPER_BOT }} | ||
branch: ${{ steps.set_target_branch.outputs.target_branch }} | ||
title: 🎨🖌️ Bump Zapper Studio | ||
commit-message: Bump Zapper Studio | ||
body: | | ||
⚙️ _This pull request was opened automatically from Zapper-fi/studio._ | ||
${{ needs.release.outputs.changelog }} | ||
base: master | ||
delete-branch: true |
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
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"branches": ["main"], | ||
"tagFormat": "${version}", | ||
"plugins": [ | ||
["@semantic-release/npm", { | ||
"npmPublish": false | ||
|