Skip to content

Commit

Permalink
ci: add release
Browse files Browse the repository at this point in the history
  • Loading branch information
xseman committed Jan 9, 2024
1 parent 1ad88e2 commit 70f4ca1
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.1"
}
21 changes: 21 additions & 0 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "node",
"include-v-in-tag": true,
"include-component-in-tag": false,
"pull-request-title-pattern": "v${version}"
}
},
"changelog-sections": [
{ "type": "build", "section": "Maintenance" },
{ "type": "chore", "section": "Maintenance" },
{ "type": "ci", "section": "Maintenance" },
{ "type": "deps", "section": "Dependency updates" },
{ "type": "docs", "section": "Documentation" },
{ "type": "style", "section": "Styles" },
{ "type": "refactor", "section": "Refactors" },
{ "type": "test", "section": "Tests", "hidden": true }
]
}
28 changes: 28 additions & 0 deletions .github/workflows/inactive-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: check & close inactive issues

on:
schedule:
- cron: 30 1 * * *

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
env:
DAYS_BEFORE_STALE: 90
DAYS_BEFORE_CLOSE: 30
steps:
- uses: actions/stale@v8
with:
days-before-issue-stale: ${{ env.DAYS_BEFORE_STALE }}
days-before-issue-close: ${{ env.DAYS_BEFORE_CLOSE }}
exempt-issue-labels: good first issue,help wanted
stale-issue-label: stale
stale-issue-message: >
This issue is stale because it has been open for
${{ env.DAYS_BEFORE_STALE }} days with no activity.
close-issue-message: >
This issue was closed because it has been inactive
for ${{ env.DAYS_BEFORE_CLOSE }} days since being marked as stale.
repo-token: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release-please

on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
manifest-file: .github/.release-please-manifest.json
config-file: .github/release-please-config.json

- if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4

- if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org"

- if: ${{ steps.release.outputs.release_created }}
run: |
npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.18

0 comments on commit 70f4ca1

Please sign in to comment.