chore(release): 5.6.1-alpha.0 #55
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: 'Create github and npm releases' | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
check-release: | |
name: 'Check release is good and ready' | |
uses: ./.github/workflows/check-pr.yml | |
with: | |
skip-deduplication: true | |
make-release: | |
name: 'Make github and npm releases' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
needs: check-release | |
steps: | |
- name: 'Checkout source code' | |
uses: 'actions/checkout@v4' | |
- name: 'Prepare workflow' | |
uses: ./.github/actions/prepare | |
- name: 'Make .d.ts' | |
run: yarn make-types | |
- name: 'Publish package' | |
run: "yarn publish --tag ${{ ((contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta')) && 'next') || 'latest' }} --access public" | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Generate Changelog | |
run: | | |
START=$(grep -n "## \[" CHANGELOG.md | head -n 1 | cut -d : -f 1) | |
END=$(grep -n "## \[" CHANGELOG.md | head -n 2 | tail -n 1 | cut -d : -f 1) | |
awk "NR > $START && NR < $END" CHANGELOG.md | sed -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba' > ${{ github.workspace }}-CHANGELOG.temp.md | |
- name: 'Create a github release' | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') }} | |
tag_name: "${{ github.ref_name }}" | |
body_path: ${{ github.workspace }}-CHANGELOG.temp.md |