From 873ba7c4163d55194458d95ce82ae365d9ad4f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Ciccola?= Date: Wed, 10 Apr 2024 13:55:51 -0300 Subject: [PATCH 1/3] add release workflow --- .github/workflows/release.yml | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b70200b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: release + +on: + workflow_dispatch: + inputs: + semver: + description: 'The semver to use' + required: true + default: 'patch' + type: choice + options: + - auto + - patch + - minor + - major + - prerelease + - prepatch + - preminor + - premajor + pull_request: + types: [closed] + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + steps: + - name: Use Node.js 12 + uses: actions/setup-node@v3 + with: + node-version: 12 + - uses: nearform-actions/optic-release-automation-action@v4 + with: + commit-message: 'Release {version}' + sync-semver-tags: true + access: 'public' + # This prefix is added before the prerelease number, e.g. `v3.0.0-next.0` + prerelease-prefix: 'next' + semver: ${{ github.event.inputs.semver }} + # Prereleases are published under the `next` npm dist-tag + npm-tag: ${{ startsWith(github.event.inputs.semver, 'pre') && 'next' || 'latest' }} + # Don't notify linked issues + notify-linked-issues: false + # optional: set this secret in your repo config for publishing to NPM + npm-token: ${{ secrets.NPM_TOKEN }} + build-command: | + npm install From 1609b6efc2d45513e5f32288f6a16d7e43a734a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Ciccola?= Date: Wed, 29 May 2024 12:35:49 -0300 Subject: [PATCH 2/3] update node version --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b70200b..bd0c785 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,20 +28,20 @@ jobs: issues: write pull-requests: write steps: - - name: Use Node.js 12 + - name: Use Node.js 14 uses: actions/setup-node@v3 with: - node-version: 12 + node-version: 14 - uses: nearform-actions/optic-release-automation-action@v4 with: commit-message: 'Release {version}' sync-semver-tags: true access: 'public' - # This prefix is added before the prerelease number, e.g. `v3.0.0-next.0` - prerelease-prefix: 'next' + # This prefix is added before the prerelease number, e.g. `v3.0.0-alpha.0` + prerelease-prefix: 'alpha' semver: ${{ github.event.inputs.semver }} - # Prereleases are published under the `next` npm dist-tag - npm-tag: ${{ startsWith(github.event.inputs.semver, 'pre') && 'next' || 'latest' }} + # Prereleases are published under the `alpha` npm dist-tag + npm-tag: ${{ startsWith(github.event.inputs.semver, 'pre') && 'alpha' || 'latest' }} # Don't notify linked issues notify-linked-issues: false # optional: set this secret in your repo config for publishing to NPM From 0e27e51c7b6ae609e2cc1ceccf2a9ca7c89fa7c2 Mon Sep 17 00:00:00 2001 From: tomasciccola <117094913+tomasciccola@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:35:07 -0300 Subject: [PATCH 3/3] npm install -> npm ci Co-authored-by: Evan Hahn --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd0c785..9003408 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,4 +47,4 @@ jobs: # optional: set this secret in your repo config for publishing to NPM npm-token: ${{ secrets.NPM_TOKEN }} build-command: | - npm install + npm ci