Skip to content

Merge pull request #10 from Woodpile37/snyk-upgrade-d14790ad9847802c0… #20

Merge pull request #10 from Woodpile37/snyk-upgrade-d14790ad9847802c0…

Merge pull request #10 from Woodpile37/snyk-upgrade-d14790ad9847802c0… #20

name: Release Please
on:
push:
branches:
- main
jobs:
release-please:
name: Release
runs-on: ubuntu-latest
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/gallium'
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: 7.0.1
run_install: true
if: ${{ steps.release.outputs.release_created }}
- name: Publish to NPM
run: |
pnpm build
cd dist
pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_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_studio:
name: Bump on Zapper API
needs: [release-please]
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.published == '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: 'lts/gallium'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/[email protected]
with:
version: 7.0.1
run_install: true
- name: Upgrade dependencies
run: |
pnpm up @zapper-fi/studio@latest
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GH_ZAPPER_BOT }}
branch: bump-zapper-studio
title: '🎨🖌️ Bump Zapper Studio ${{ needs.release-please.outputs.release }}'
commit-message: Bump Zapper Studio
body: |
⚙️ _This pull request was opened automatically from Zapper-fi/studio._
${{ needs.release-please.outputs.changelog }}
base: master
delete-branch: true