Skip to content

added release + version scripts #4

added release + version scripts

added release + version scripts #4

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.x
- name: Install Dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm ci:publish
version: pnpm ci:version
commit: "chore: release"
title: "Release"
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Slack Notification
id: slack
uses: slackapi/slack-github-action@v1.24.0
with:
# For posting a rich message using Block Kit
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action Release result: ${{ job.status }}\nPublish Result: ${{ steps.changesets.outputs.published }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK