release: v0.1.0 发布~! #8
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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | |
name: Release CI | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- "v*.*.*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
permissions: | |
contents: write | |
discussions: write | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
outputs: | |
RELEASE_UPLOAD_ID: ${{ steps.create_release.outputs.id }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Query version number | |
id: get_version | |
shell: bash | |
run: | | |
echo "using version tag ${GITHUB_REF:10}" | |
echo ::set-output name=version::"${GITHUB_REF:10}" | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: "${{ steps.get_version.outputs.VERSION }}" | |
body: '<a href="https://github.com/charlzyx/arco.formily/blob/master/CHANGELOG.md">CHANGELOG</a>' | |
publish-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- run: yarn | |
- run: yarn build | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_ACCESS_TOKEN}} | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: "https://npm.pkg.github.com" | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ github.token }} |