From ab32646936ac2ba618c722ad2bda2888aa0113af Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 9 Dec 2024 02:17:31 +0800 Subject: [PATCH] chore: add new workflow --- .github/workflows/update-force.yml | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/update-force.yml diff --git a/.github/workflows/update-force.yml b/.github/workflows/update-force.yml new file mode 100644 index 0000000..fd1979a --- /dev/null +++ b/.github/workflows/update-force.yml @@ -0,0 +1,50 @@ +name: Update Themes and Grammars (Force) + +permissions: + contents: write + id-token: write + +on: + workflow_dispatch: + +jobs: + update-grammars: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v4 + with: + node-version: lts/* + registry-url: 'https://registry.npmjs.org' + + - name: pnpm setup + uses: pnpm/action-setup@v4 + + - name: install + run: pnpm install + + - run: pnpm run fetch:force + env: + GITHUB_TOKEN: ${{ secrets.FETCH_GITHUB_TOKEN }} + timeout-minutes: 2 + + - id: bump + name: Bump versions + run: pnpm run bump + + - uses: EndBug/add-and-commit@v9 + if: ${{ steps.bump.outputs.CHANGED }} + with: + author_name: GitHub Actions + author_email: 41898282+github-actions[bot]@users.noreply.github.com + message: 'feat: update Themes and Grammars [ci skip]' + + - run: pnpm -r publish + if: ${{ steps.bump.outputs.CHANGED }} + env: + NPM_CONFIG_PROVENANCE: true + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}