Skip to content

chore(release): 2.5.3 #8

chore(release): 2.5.3

chore(release): 2.5.3 #8

Workflow file for this run

name: 'Create github and npm releases'
on:
push:
tags:
- "v*"
jobs:
make-release:
name: 'Make github and npm releases'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 'Checkout source code'
uses: 'actions/checkout@v4'
- name: 'Setup node'
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
scope: '@dtrw'
- name: 'Install dependencies'
run: yarn
# - name: 'Test configs'
# run: yarn test
- name: 'Lint configs'
run: yarn lint
- 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