Library Snapshot #43
Workflow file for this run
This file contains hidden or 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: Library Snapshot | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup | |
| uses: aragon/gov-ui-kit/.github/actions/setup@main | |
| with: | |
| # Checkout full history to correclty check changeset status | |
| fetch-depth: 0 | |
| token: ${{ secrets.ARABOT_PAT_TRIGGER_WORKFLOW }} | |
| - name: Check changeset | |
| run: yarn changeset status --since origin/main | |
| - name: Build library | |
| run: yarn build | |
| - name: Update version | |
| run: yarn changeset version --snapshot | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.ARABOT_PAT_TRIGGER_WORKFLOW }} | |
| - name: Get package version | |
| id: package-version | |
| uses: martinbeentjes/npm-get-version-action@v1.3.1 | |
| - name: Publish snapshot | |
| run: | | |
| yarn config set npmAuthToken ${{ secrets.NPM_TOKEN }} | |
| yarn npm publish --access public --tag ${{ steps.package-version.outputs.current-version }} | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Print snapshot version | |
| run: echo "Snapshot release - ${{ steps.package-version.outputs.current-version }}" |