From e3b1bf0925ab177aa9659c0546e748ffa4d1e73d Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 1 Sep 2023 17:33:42 +0000 Subject: [PATCH] ci: use open-turo/semantic-release-config and update actions-node --- .github/workflows/ci.yaml | 23 ++++++++++++----------- .github/workflows/release.yaml | 2 +- .releaserc.json | 33 +-------------------------------- 3 files changed, 14 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2bd1dca..fdc122c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,6 +4,15 @@ on: push: jobs: + release-notes: + name: Release notes preview + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/main' + steps: + - uses: open-turo/actions-release/release-notes-preview@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + lint: runs-on: ubuntu-latest name: Lint @@ -13,22 +22,14 @@ jobs: mkdir -p "$HOME/bin" bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) latest "$HOME/bin" echo "${HOME}/bin" >> "$GITHUB_PATH" - - uses: open-turo/actions-node/lint@v3 + - uses: open-turo/actions-node/lint@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} + test: runs-on: ubuntu-latest name: Test steps: - - uses: open-turo/actions-node/test@v3 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - release-notes: - runs-on: ubuntu-latest - name: Release notes preview - env: - NPM_TOKEN: ${{ secrets.OPEN_TURO_NPM_TOKEN }} - steps: - - uses: open-turo/actions-release/release-notes-preview@v1 + - uses: open-turo/actions-node/test@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9bb49a2..1b9cf37 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Release - uses: open-turo/actions-node/release@v3 + uses: open-turo/actions-node/release@v5 with: github-token: ${{ secrets.OPEN_TURO_GITHUB_TOKEN }} npm-token: ${{ secrets.OPEN_TURO_NPM_TOKEN }} diff --git a/.releaserc.json b/.releaserc.json index 2d81975..566e39e 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -1,34 +1,3 @@ { - "branches": [ - "main", - "next", - { - "name": "(f|b|c)/*", - "channel": "next", - "prerelease": "beta-${(/^[a-zA-Z]+-[0-9]+/.exec(name.substr(2)) || [name.replace(/[_/.]/g, '-')])[0]}-${Date.now()}" - } - ], - "plugins": [ - "@semantic-release/commit-analyzer", - "@semantic-release/release-notes-generator", - [ - "@semantic-release/npm", - { - "tarballDir": "pack" - } - ], - [ - "@semantic-release/github", - { - "assets": ["pack/*.tgz"] - } - ], - [ - "@semantic-release/git", - { - "assets": ["package.json", "package-lock.json"], - "message": "ci(release): ${nextRelease.version} <% nextRelease.channel !== 'next' ? print('[skip ci]') : print('') %>\n\n${nextRelease.notes}" - } - ] - ] + "extends": ["@open-turo/semantic-release-config"] }