Skip to content

Update Showbie brand colour (#273) #115

Update Showbie brand colour (#273)

Update Showbie brand colour (#273) #115

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
published: ${{ steps.changesets.outputs.published }}
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
steps:
# https://github.com/actions/checkout
- name: Checkout repo
uses: actions/checkout@main
with:
fetch-depth: 0
# https://github.com/actions/setup-node/
- name: Setup Node.js 16.x
uses: actions/setup-node@v2.5.1
with:
node-version: 16.x
registry-url: https://npm.pkg.github.com
# https://github.com/bahmutov/npm-install
# Custom install command to prevent husky from installing.
- name: Install dependencies
uses: bahmutov/npm-install@v1
with:
install-command: yarn --ignore-scripts --no-audit
# Create a temp .npmrc file so changesets doesn't use its default.
- name: Create CI .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
registry=https://npm.pkg.github.com/
always-auth=true
EOF
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/changesets/action
- name: Create release PR or publish
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
title: 'Chore: Publish release'
version: yarn version:changeset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
notify:
name: Notify
needs: release
runs-on: ubuntu-latest
steps:
- name: Echo outputs
run: echo ${{ join(fromJson(needs.release.outputs.publishedPackages).*.name, ', ') }}
- name: Send Tokens package notification
uses: stormwarning/action-release-notification@v3.1.1
if: contains(fromJson(needs.release.outputs.publishedPackages).*.name, '@showbie/backpack-tokens')
with:
channel: design
message: A new version of *@showbie/backpack-tokens* was just released!
actions: '[{"text": "View changelog πŸŽ‰", "url": "https://github.com/showbie/backpack/blob/trunk/packages/backpack-tokens/CHANGELOG.md"},{"text": "View docs πŸ“š", "url": "https://design.showbie.com/"}]'
env:
SLACKBOT_TOKEN: ${{ secrets.SLACKBOT_TOKEN }}
- name: Send Generator package notification
uses: stormwarning/action-release-notification@v3.1.1
if: contains(fromJson(needs.release.outputs.publishedPackages).*.name, '@showbie/generator-backpack')
with:
channel: socrative-dev
message: A new version of *@showbie/generator-backpack* was just released!
actions: '[{"text": "View changelog πŸŽ‰", "url": "https://github.com/showbie/backpack/blob/trunk/packages/generator-backpack/CHANGELOG.md"}]'
env:
SLACKBOT_TOKEN: ${{ secrets.SLACKBOT_TOKEN }}
- name: Send Stickerbomb package notification
uses: stormwarning/action-release-notification@v3.1.1
if: contains(fromJson(needs.release.outputs.publishedPackages).*.name, 'stickerbomb')
with:
channel: socrative-dev
message: A new version of *stickerbomb* was just released!
actions: '[{"text": "View changelog πŸŽ‰", "url": "https://github.com/showbie/backpack/blob/trunk/packages/stickerbomb/CHANGELOG.md"}]'
env:
SLACKBOT_TOKEN: ${{ secrets.SLACKBOT_TOKEN }}