From 64968fcde62a6194f38f1c5d21f941b622635d09 Mon Sep 17 00:00:00 2001 From: Chun Shang Date: Wed, 30 Nov 2022 12:02:05 +0800 Subject: [PATCH] add release workflow --- .github/workflows/publish.yaml | 5 ++--- .github/workflows/release.yaml | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 548c38ca5..a26c16115 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -5,11 +5,10 @@ on: jobs: build: runs-on: ubuntu-latest - permissions: - contents: read - packages: write steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Setup .npmrc file to publish to GitHub Packages - uses: actions/setup-node@v3 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..7aef3f0ac --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,21 @@ +name: Release +on: + push: + branches: + - master + +jobs: + build: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Release + uses: justincy/github-action-npm-release@v1.2.0 + id: release + - name: Print release output + if: ${{ steps.release.outputs.released == 'true' }} + run: echo Release ID ${{ steps.release.outputs.release_id }}