diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3fc98f7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for more information: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://containers.dev/guide/dependabot + +version: 2 +updates: + - package-ecosystem: npm + directory: "/" + schedule: + interval: weekly + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly diff --git a/.github/workflows/manual-pub.yml b/.github/workflows/manual-pub.yml new file mode 100644 index 0000000..294d0df --- /dev/null +++ b/.github/workflows/manual-pub.yml @@ -0,0 +1,21 @@ +name: Manually Publish + +on: + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + cache: npm + node-version: 22 + registry-url: "https://registry.npmjs.org" + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..6d24311 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +name: Check Relese & Publish + +on: + push: + branches: + - main + +jobs: + release-please: + runs-on: ubuntu-latest + outputs: + do_publish: ${{ steps.release.outputs.release_created }} + permissions: + contents: write + pull-requests: write + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + release-type: node + + publish: + if: ${{ needs.release-please.outputs.do_publish }} + needs: release-please + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + cache: npm + node-version: 22 + registry-url: "https://registry.npmjs.org" + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..99af1d6 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,17 @@ +name: Test +on: + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + cache: npm + node-version: 22 + - run: npm ci + - run: npm run test