chore(firebase): release version 0.7.5 #24
Workflow file for this run
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 to npm | |
on: | |
push: | |
tags: | |
- "firebase@*" | |
- "testing-library@*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# We want to get the tag name without the @version suffix, this is our | |
# package name | |
- uses: actions/github-script@v6 | |
id: get-tag-name | |
env: | |
GIT_TAG_NAME: ${{ github.ref_name }} | |
with: | |
result-encoding: string | |
script: return process.env.GIT_TAG_NAME.split('@')[0] | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
# - uses: nrwl/nx-set-shas@v3 | |
# id: nx-toolkit-nx-set-shas | |
# with: | |
# workflow-id: 'publish firebase generator' | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 7 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint | |
run: pnpm nx run ${{ steps.get-tag-name.outputs.result }}:lint | |
- name: Test | |
run: pnpm nx run ${{ steps.get-tag-name.outputs.result }}:test | |
- name: Build | |
run: pnpm nx run ${{ steps.get-tag-name.outputs.result }}:build | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: dist/packages/${{ steps.get-tag-name.outputs.result }}/*.* | |
bodyFile: "packages/${{ steps.get-tag-name.outputs.result }}/CHANGELOG.md" | |
- name: npm publish | |
run: npm publish dist/packages/${{ steps.get-tag-name.outputs.result }} --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |