This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
chore(main): release 0.525.0 (#2914) #2503
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 Please | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-please: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
outputs: | |
published: ${{ steps.set_outputs.outputs.published }} | |
release: ${{ steps.set_outputs.outputs.release }} | |
changelog: ${{ steps.set_outputs.outputs.changelog }} | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
release-type: node | |
token: ${{ secrets.GH_ZAPPER_BOT }} | |
package-name: '@zapper-fi/studio' | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
if: ${{ steps.release.outputs.release_created }} | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 'lts/hydrogen' | |
registry-url: 'https://registry.npmjs.org' | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Cache pnpm modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
if: ${{ steps.release.outputs.release_created }} | |
- uses: pnpm/[email protected] | |
with: | |
version: 8.6.6 | |
run_install: true | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Build package | |
env: | |
NODE_OPTIONS: '--max_old_space_size=4096' | |
run: pnpm build | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Publish to Github Packages | |
working-directory: dist | |
run: | | |
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" > .npmrc | |
npm config set registry https://npm.pkg.github.com | |
npm publish --no-git-checks | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Fetch Release | |
id: fetch-latest-release | |
uses: gregziegan/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Set Outputs | |
id: set_outputs | |
run: | | |
echo "::set-output name=published::${{ steps.release.outputs.release_created }}" | |
echo "::set-output name=release::${{ steps.fetch-latest-release.outputs.name }}" | |
echo "::set-output name=changelog::${{ steps.fetch-latest-release.outputs.body }}" | |
if: ${{ steps.release.outputs.release_created }} | |
bump-zapper-api: | |
name: Bump on Zapper API | |
needs: [release-please] | |
runs-on: ubuntu-latest | |
if: ${{ needs.release-please.outputs.published == 'true' }} | |
steps: | |
- uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.GH_ZAPPER_BOT }} | |
repository: zapper-fi/zapper-api | |
event-type: bump-studio | |
client-payload: '{"release": "${{ needs.release-please.outputs.release }}", "changelog": "${{ needs.release-please.outputs.changelog }}"}' |