Skip to content

Commit

Permalink
ci: use open-turo/semantic-release-config and update actions-node
Browse files Browse the repository at this point in the history
  • Loading branch information
tagoro9 committed Sep 1, 2023
1 parent 3b8a49f commit e3b1bf0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 44 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
33 changes: 1 addition & 32 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -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"]
}

0 comments on commit e3b1bf0

Please sign in to comment.