diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..427825f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,20 @@ +on: + workflow_dispatch: + release: + types: [published] + branches: [master] + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write # allow GITHUB_TOKEN to publish packages + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "20" + - uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release_please.yml b/.github/workflows/release_please.yml new file mode 100644 index 0000000..6380a82 --- /dev/null +++ b/.github/workflows/release_please.yml @@ -0,0 +1,24 @@ +on: + push: + branches: + - master + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + with: + # this assumes that you have created a personal access token + # (PAT) and configured it as a GitHub action secret named + # `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important). + token: ${{ secrets.GH_PAT }} + # this is a built-in strategy in release-please, see "Action Inputs" + # for more options + release-type: node