diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bfb1726 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Release +on: + push: + branches: + - main + +jobs: + release: + if: github.repository == 'goenning/google-indexing-script' + + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Use Node + uses: actions/setup-node@v4 + with: + cache: "npm" + + - name: Install Dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Create Release Pull Request or Publish to npm + uses: changesets/action@v1 + with: + publish: npm run release + version: npm run version + commit: "release version" + title: "release version" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}