diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a8409a4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Release + +on: + release: + types: [published] + +env: + NPM_TOKEN: ${{secrets.NPM_TOKEN}} + +permissions: + contents: read + id-token: write + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set Node + uses: actions/setup-node@v3 + with: + node-version: '18.x' + + - name: Install + run: yarn + + - name: Build + run: | + yarn build + + - name: Package Version Bump + run: | + yarn version ${{ github.event.release.tag_name }} + + - name: Commit + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: 'chore: bump version ${{ github.event.release.tag_name }}' + branch: master + + - name: Publish + run: | + yarn publish --tag latest