v1.1.2 #13
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 | |
permissions: | |
contents: write | |
deployments: write | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.release.target_commitish }} | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Set up git | |
run: | | |
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git config --local user.name 'github-actions[bot]' | |
- name: Bump version to ${{ github.event.release.tag_name }} | |
run: npm version ${{ github.event.release.tag_name }} | |
- name: Build | |
run: bun run build | |
- name: Generate Publish Structure | |
run: bun run generatePublishStructure | |
- name: Publish | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_TAG: ${{ github.event.release.prerelease == true && 'next' || 'latest' }} | |
run: | | |
npm config set //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} | |
npm publish --tag $NPM_TAG | |
- name: Push changes | |
run: git push | |
env: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |