From 3eb64cc959396a1042c79e2f060f5e73ce819e94 Mon Sep 17 00:00:00 2001 From: Jamie Slome Date: Mon, 13 May 2024 14:25:02 +0100 Subject: [PATCH 1/3] chore(ci): add npm version command before release to github and npm --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d2726d4..02db01bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,15 @@ permissions: contents: read jobs: + update_version: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: read + steps: + - uses: actions/checkout@8459bc0 # v4 + - uses: actions/setup-node@c2ac33f # v4, Setup .npmrc file to publish to npm + - run: npm version minor create_github_release: outputs: full-tag: ${{ steps.release-drafter.outputs.tag_name }} From eda8851595cdcd6f028f616b53ad4ef3c106db49 Mon Sep 17 00:00:00 2001 From: Jamie Slome Date: Mon, 13 May 2024 14:28:26 +0100 Subject: [PATCH 2/3] test(ci): update trigger to on pull_request --- .github/workflows/release.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 02db01bb..94dfe390 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,18 +2,7 @@ name: Release on: - workflow_dispatch: - push: - branches: - - main - paths: - - 'src/**' - - 'test/**' - - 'scripts/**' - - 'public/**' - - 'packages/**' - - 'package.json' - - 'package-lock.json' + pull_request: permissions: contents: read From 5e4f7a87027a614388c3d336bcca151b3bfb2ed8 Mon Sep 17 00:00:00 2001 From: Jamie Slome Date: Mon, 13 May 2024 14:31:47 +0100 Subject: [PATCH 3/3] test(ci): remove github and npm release from steps --- .github/workflows/release.yml | 82 +++++++++++++++++------------------ 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94dfe390..7a6cad3d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,45 +14,45 @@ jobs: contents: write pull-requests: read steps: - - uses: actions/checkout@8459bc0 # v4 - - uses: actions/setup-node@c2ac33f # v4, Setup .npmrc file to publish to npm + - uses: actions/checkout@v4 # v4 + - uses: actions/setup-node@v4 # v4, Setup .npmrc file to publish to npm - run: npm version minor - create_github_release: - outputs: - full-tag: ${{ steps.release-drafter.outputs.tag_name }} - short-tag: ${{ steps.get_tag_name.outputs.SHORT_TAG }} - body: ${{ steps.release-drafter.outputs.body }} - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: read - steps: - - uses: release-drafter/release-drafter@v6 - id: release-drafter - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - publish: true - - name: Get the short tag - id: get_tag_name - run: | - short_tag=$(echo ${{ steps.release-drafter.outputs.tag_name }} | cut -d. -f1) - echo "SHORT_TAG=$short_tag" >> $GITHUB_OUTPUT - create_npm_release: - needs: create_github_release - runs-on: ubuntu-latest - permissions: - packages: write - env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - steps: - - uses: actions/checkout@8459bc0 # v4 - - uses: actions/setup-node@c2ac33f # v4, Setup .npmrc file to publish to npm - with: - node-version: '18.x' - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm publish --access=public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # create_github_release: + # outputs: + # full-tag: ${{ steps.release-drafter.outputs.tag_name }} + # short-tag: ${{ steps.get_tag_name.outputs.SHORT_TAG }} + # body: ${{ steps.release-drafter.outputs.body }} + # runs-on: ubuntu-latest + # permissions: + # contents: write + # pull-requests: read + # steps: + # - uses: release-drafter/release-drafter@v6 + # id: release-drafter + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # publish: true + # - name: Get the short tag + # id: get_tag_name + # run: | + # short_tag=$(echo ${{ steps.release-drafter.outputs.tag_name }} | cut -d. -f1) + # echo "SHORT_TAG=$short_tag" >> $GITHUB_OUTPUT + # create_npm_release: + # needs: create_github_release + # runs-on: ubuntu-latest + # permissions: + # packages: write + # env: + # REGISTRY: ghcr.io + # IMAGE_NAME: ${{ github.repository }} + # steps: + # - uses: actions/checkout@8459bc0 # v4 + # - uses: actions/setup-node@c2ac33f # v4, Setup .npmrc file to publish to npm + # with: + # node-version: '18.x' + # registry-url: 'https://registry.npmjs.org' + # - run: npm ci + # - run: npm publish --access=public + # env: + # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}