chore: release main #101
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: Publish Packages | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: '${{ github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
release: | |
name: Create releases | |
runs-on: ubuntu-latest | |
outputs: | |
releases_created: ${{ steps.release.outputs.release_created }} | |
steps: | |
- name: π οΈ Create releases | |
id: release | |
uses: googleapis/release-please-action@v4 | |
deploy: | |
name: Create and publish packages | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
needs: release | |
if: needs.release.outputs.releases_created | |
steps: | |
- name: β¬οΈ Set up code | |
uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: β Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
check-latest: true | |
cache: npm | |
registry-url: 'https://registry.npmjs.org' | |
- name: π₯ Download dependencies | |
run: npm ci | |
- name: π Run build script | |
run: npm run build | |
- name: π’ Publish packages | |
run: ./scripts/publish.sh | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
deploy-storybook: | |
name: π Deploy documentation | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
environment: | |
name: prod | |
steps: | |
- name: β¬οΈ Set up code | |
uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: β Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: npm | |
- name: π Deploy | |
uses: agrc/firebase-website-deploy-composite-action@v1 | |
with: | |
identity-provider: ${{ secrets.IDENTITY_PROVIDER }} | |
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }} | |
project-id: ${{ secrets.PROJECT_ID }} | |
prebuild-command: npm run build --workspace @ugrc/utilities && npm run build | |
build-command: npm run build:storybook | |
env: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
VITE_QUAD_WORD: ${{ secrets.DISCOVER_QUAD_WORD }} |