From 6f68756563023eb6db663a4ad8e77626238ffc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Wed, 25 Oct 2023 13:39:12 +0200 Subject: [PATCH 1/4] Add dependabot --- .github/dependabot.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e7b47dd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: /test + schedule: + interval: monthly + timezone: Europe/Copenhagen + reviewers: + - "reload/developers" + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: monthly + timezone: Europe/Copenhagen + reviewers: + - "reload/developers" From d142b4ca7626073c7873ee78c6307e013bd863cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Wed, 25 Oct 2023 13:39:22 +0200 Subject: [PATCH 2/4] Add release workflow for automated release tagging --- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 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..c7a2c08 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Release +on: + push: + branches: main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Bump version and push tag + uses: anothrNick/github-tag-action@1.67.0 + id: version + env: + GITHUB_TOKEN: ${{ github.token }} + WITH_V: true + DEFAULT_BUMP: patch + - name: Major version tag + id: major-version + if: ${{ (steps.version.outputs.new_tag != '') }} + uses: actions/github-script@v6 + with: + script: | + core.setOutput('tag', '${{ steps.version.outputs.new_tag }}'.split('.')[0]) + - name: Tag major version ${{ steps.major-version.outputs.tag }} + if: ${{ (steps.version.outputs.new_tag != '') }} + run: | + git tag --force ${{ steps.major-version.outputs.tag }} + git push origin ${{ steps.major-version.outputs.tag }} --force + - name: Create/update major version release + if: ${{ (steps.version.outputs.new_tag != '') }} + uses: ncipollo/release-action@v1 + with: + token: ${{ github.token }} + allowUpdates: true + generateReleaseNotes: true + tag: ${{ steps.major-version.outputs.tag }} + name: ${{ steps.major-version.outputs.tag }} (${{ steps.version.outputs.new_tag }}) + - name: Create release ${{ steps.version.outputs.new_tag }} + if: ${{ (steps.version.outputs.new_tag != '') }} + uses: ncipollo/release-action@v1 + with: + token: ${{ github.token }} + generateReleaseNotes: true + tag: ${{ steps.version.outputs.new_tag }} + name: Release ${{ steps.version.outputs.new_tag }} From 99364d326d4d8af602f055dbf9b8661a6c957a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Wed, 25 Oct 2023 13:41:45 +0200 Subject: [PATCH 3/4] Fix action workflow token --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 95fc229..297defb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,5 +26,5 @@ jobs: - name: JSTS Quality uses: ./ with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ github.token }} working_directory: ./test From 4044e5fada19268f0a80ec50416168a240900bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Wed, 25 Oct 2023 13:42:21 +0200 Subject: [PATCH 4/4] Use node 20 for testing --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 297defb..0b4ad2c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version: '16' + node-version: '20' cache: 'npm' cache-dependency-path: ./test/package-lock.json