Skip to content

chore: release master (#105) #55

chore: release master (#105)

chore: release master (#105) #55

Workflow file for this run

name: Release
on:
push:
branches:
- master
jobs:
maybe-release:
name: release
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: google-github-actions/release-please-action@v3 # it will analyze commits and create PR with new version and updated CHANGELOG:md file. On merging it will create github release page with changelog
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: master
release-type: node
monorepo-tags: true
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false},{"type":"revert","hidden":true}]'
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.releases_created }}
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.releases_created }}
- run: corepack enable
if: ${{ steps.release.outputs.releases_created }}
- run: yarn install --immutable
if: ${{ steps.release.outputs.releases_created }}
- run: yarn build
if: ${{ steps.release.outputs.releases_created }}
- env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.releases_created }}
run: |
echo npmAuthToken: "$NODE_AUTH_TOKEN" >> ./.yarnrc.yml
- run: yarn workspaces foreach --all -v --exclude root --no-private npm publish --tolerate-republish --access public
if: ${{ steps.release.outputs.releases_created }}
- name: Publish Docs to Cloudflare Pages
if: ${{ steps.release.outputs.releases_created }}
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 2238a825c5aca59233eab1f221f7aefb
projectName: gopher-docs-preview
directory: ./docs/build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref || github.ref_name }}