From 899f291f03643ab24f052ac51a8fbd7d553b5f1c Mon Sep 17 00:00:00 2001 From: Niklas Gehlen Date: Mon, 8 May 2023 12:19:47 +0200 Subject: [PATCH] Automatically release major versions. --- .github/workflows/main.yml | 2 +- .../workflows/release-new-action-version.yml | 25 +++++++++++++++++++ README.md | 2 +- dist/main/index.js | 2 +- main.ts | 2 +- 5 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release-new-action-version.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b85e561..d3e4171 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v3 - name: Configure access to Namespace id: nscloud - uses: namespacelabs/nscloud-setup@v0.0.5 + uses: namespacelabs/nscloud-setup@v0 - name: Configure buildx uses: ./ # Uses an action in the root directory - name: Build and push diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml new file mode 100644 index 0000000..0fdf441 --- /dev/null +++ b/.github/workflows/release-new-action-version.yml @@ -0,0 +1,25 @@ +name: Release new action version + +on: + release: + types: [released] + workflow_dispatch: + inputs: + TAG_NAME: + description: "Tag name that the major tag will point to" + required: true + +env: + TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} +permissions: + contents: write + +jobs: + update_tag: + name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes + runs-on: ubuntu-latest + steps: + - name: Update the ${{ env.TAG_NAME }} tag + uses: actions/publish-action@v0.2.2 + with: + source-tag: ${{ env.TAG_NAME }} diff --git a/README.md b/README.md index 84c50dd..e47b4ca 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Configure access to Namespace - uses: namespacelabs/nscloud-setup@v0.0.5 + uses: namespacelabs/nscloud-setup@v0 - name: Configure buildx uses: namespacelabs/nscloud-setup-buildx-action@v0.0.4 - name: Build and push diff --git a/dist/main/index.js b/dist/main/index.js index 02b0112..4f984fa 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -4355,7 +4355,7 @@ function run() { Please add a step this step to your workflow's job definition: -- uses: namespacelabs/nscloud-setup@v0.0.3`); +- uses: namespacelabs/nscloud-setup@v0`); }); }); } diff --git a/main.ts b/main.ts index 14fca72..c7e0e7a 100644 --- a/main.ts +++ b/main.ts @@ -13,7 +13,7 @@ async function run(): Promise { Please add a step this step to your workflow's job definition: -- uses: namespacelabs/nscloud-setup@v0.0.3`); +- uses: namespacelabs/nscloud-setup@v0`); }); }