Skip to content

Merge pull request #104 from adamvindico/master #73

Merge pull request #104 from adamvindico/master

Merge pull request #104 from adamvindico/master #73

Workflow file for this run

name: Release
env:
GITHUB_TOKEN: ${{ secrets.SELF_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_BRANCH: ${{ github.ref_name }}
on:
push:
branches:
- master
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: pnpm install --no-frozen-lockfile
- name: Build Packages
run: pnpm build
- name: Fetch Github User Email & Name
run: |
git config --global user.email $(git log -n 1 --pretty=format:%ae)
git config --global user.name $(git log -n 1 --pretty=format:%an)
- name: Generate changelogrc
run: pnpm changelog:gen
- name: Bump version
run: pnpm changeset version
- name: Publish packages and create releases
run: |
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
pnpm changeset:publish
- name: Generate changelog files
run: pnpm changelog:write
- name: Commit changelog files
run: |
git add . && git diff --staged --quiet || git commit -am "docs: 馃摑 update changelog on repository" && git push origin $GITHUB_BRANCH