From bf98b26d674005363839b0a35bee874a104ce72d Mon Sep 17 00:00:00 2001 From: Jonathan Mainguy Date: Thu, 9 May 2024 08:27:09 -0400 Subject: [PATCH] feat: support node20 Adds support for node20 as node16 is being deprecated by github actions Adds github/workflow for creating releases based on conventional commits --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/test.yml | 4 ++-- .release-please-manifest.json | 3 +++ README.md | 2 +- action.yml | 2 +- release-please-config.json | 11 +++++++++++ 6 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..860698b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +--- +name: release-please + +on: + push: + branches: + - main + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + id: release + - uses: actions/checkout@v4 + - name: tag major and minor versions + if: ${{ steps.release.outputs.release_created }} + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git" + git tag -d v${{ steps.release.outputs.major }} || true + git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true + git push origin :v${{ steps.release.outputs.major }} || true + git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true + git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" + git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}" + git push origin v${{ steps.release.outputs.major }} + git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4559590..331a193 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest name: A job to test action with prefix steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: JSON to variables uses: antifree/json-to-variables@HEAD with: @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest name: A job to test action without prefix steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: JSON to variables uses: antifree/json-to-variables@HEAD with: diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..feeed79 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.1.2" +} \ No newline at end of file diff --git a/README.md b/README.md index d3736fd..5af789c 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ The prefix (optional). Default value is empty string. ### YML example ```yml - name: JSON to variables - uses: antifree/json-to-variables@v1.0.1 + uses: antifree/json-to-variables@v1.0.1 # x-release-please-version with: filename: 'test.json' prefix: 'test' diff --git a/action.yml b/action.yml index 28e8595..f427376 100644 --- a/action.yml +++ b/action.yml @@ -13,5 +13,5 @@ inputs: required: false default: '' runs: - using: 'node16' + using: 'node20' main: 'dist/index.js' diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..b5946d3 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,11 @@ +{ + "packages": { + ".": { + "release-type": "simple", + "extra-files": [ + "README.md" + ] + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" + } \ No newline at end of file