Skip to content

35.7.0

35.7.0 #134

Workflow file for this run

name: release
on:
release:
types: [ published ]
defaults:
run:
shell: bash -l {0}
env:
CACHE_NAME: node-modules-cache
BUILD_CACHE_NAME: build-cache
jobs:
Create-NPM-Cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: 'https://registry.npmjs.org'
- name: Upload to Cache
uses: actions/[email protected]
id: npm-cache
with:
path: |
node_modules/
packages/node_modules/
key: ${{ env.CACHE_NAME }}-${{ hashFiles('package-lock.json', 'packages/package-lock.json') }}
- name: Install dependencies
if: ${{ steps.npm-cache.outputs.cache-hit != 'true' }}
run: npm ci
Create-Build-Cache:
runs-on: ubuntu-latest
needs: [Create-NPM-Cache]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: 'https://registry.npmjs.org'
- name: Restore NPM Cache
uses: actions/cache/[email protected]
id: npm-cache
with:
path: |
node_modules/
packages/node_modules/
key: ${{ env.CACHE_NAME }}-${{ hashFiles('package-lock.json', 'packages/package-lock.json') }}
- name: Upload dist-storybook to Cache
uses: actions/[email protected]
id: storybook-dist-cache
with:
path: |
dist-storybook/
key: ${{ env.BUILD_CACHE_NAME }}-${{ hashFiles('packages/**', 'examples/**') }}
- name: Create build cache
if: ${{ steps.storybook-dist-cache.outputs.cache-hit != 'true' }}
run: |
npm run build
npm run storybook:dist
Build:
permissions:
statuses: write
pull-requests: write
needs: [Create-NPM-Cache, Create-Build-Cache]
uses: ./.github/workflows/_build.yml
ReleaseWeb:
name: Release @skyscanner/backpack-web to NPM
runs-on: ubuntu-latest
environment: Publishing
needs: [Create-NPM-Cache, Build]
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
ref: main
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: 'https://registry.npmjs.org'
- name: Restore Cache
uses: actions/cache/[email protected]
id: npm-cache
with:
path: |
node_modules/
packages/node_modules/
key: ${{ env.CACHE_NAME }}-${{ hashFiles('package-lock.json', 'packages/package-lock.json') }}
- run: npm run transpile
- name: Publish NPM package
run: |
cd dist
npm version $RELEASE_VERSION --no-git-tag-version
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
RELEASE_VERSION: ${{ github.event.release.tag_name }}
SupernovaPublish:
runs-on: ubuntu-latest
environment: Publishing
needs: [Build]
steps:
- name: Update Supernova docs
run: npx @supernovaio/cli publish-documentation --apiKey=$SUPERNOVA_API_KEY --designSystemId=$DESIGN_SYSTEM_ID
env:
SUPERNOVA_API_KEY: ${{ secrets.SUPERNOVA_API_KEY }}
DESIGN_SYSTEM_ID: ${{ secrets.SUPERNOVA_DESIGN_SYSTEM_ID }}