From 56d2a087486e8506cc97ba66676e0099e1f19ae4 Mon Sep 17 00:00:00 2001 From: Alex Lanz Date: Fri, 28 Jul 2023 10:27:34 +0200 Subject: [PATCH 1/2] optimize CI --- .github/workflows/main.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7378f91..ad8758b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,24 +1,31 @@ name: Create Relase & Publish Package + on: push: tags: - 'v*' + +env: + NODE_VERSION: 16 + jobs: build: runs-on: ubuntu-22.04 + timeout-minutes: 5 steps: - uses: actions/checkout@v3 - - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/github-script@v6 with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - uses: aboutbits/github-actions-node/setup-and-install@v2 + script: | + github.rest.repos.createRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: '${{ github.ref }}', + name: 'Release ${{ github.ref_name }}' + }) + - uses: aboutbits/github-actions-node/setup-and-install@v1 with: - node-version: 16 + node-version: ${{ env.NODE_VERSION }} registry-url: 'https://registry.npmjs.org' - run: npm publish env: From e21c024a2c4d5783bd47db3bda8967856ffa5095 Mon Sep 17 00:00:00 2001 From: Alex Lanz Date: Fri, 28 Jul 2023 10:56:53 +0200 Subject: [PATCH 2/2] rename GitHub action files --- .github/workflows/{main.yml => release.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{main.yml => release.yml} (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/release.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/release.yml