doc(changeset): added changeset #73
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: Release | |
on: | |
push: | |
branches: | |
- main | |
- next | |
permissions: write-all | |
jobs: | |
unit_tests: | |
name: Unit tests | |
uses: ./.github/workflows/unit_tests.yml | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: unit_tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup (cache, dependencies) | |
uses: ./.github/actions/install_and_cache_dependencies | |
- name: Build | |
run: pnpm build | |
# For stable branch, use changeset action to maintain a PR and finally | |
# publish when appropriate. | |
- name: Create release (or Pull Request) | |
if: github.ref_name == 'main' | |
uses: changesets/action@v1 | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
publish: pnpm release | |
# Snapshot releases don't need the changeset action to put together PRs. | |
- name: Create snapshot release | |
if: github.ref_name == 'next' | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc | |
pnpm build | |
pnpm changeset version --snapshot next | |
pnpm changeset publish --tag next | |
# - name: Release | |
# env: | |
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# GITHUB_TOKEN: ${{ secrets.TELLUS_ACCESS_TOKEN }} | |
# run: pnpm semantic-release |