From 3ac6b69a649eb7633d942c677cde3a8580aecd99 Mon Sep 17 00:00:00 2001 From: Antoine Kingue Date: Wed, 6 Mar 2024 15:15:59 +0100 Subject: [PATCH] add release workflow --- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/release.yml 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 }}