diff --git a/.changeset/shaggy-falcons-sin.md b/.changeset/shaggy-falcons-sin.md new file mode 100644 index 0000000..635085f --- /dev/null +++ b/.changeset/shaggy-falcons-sin.md @@ -0,0 +1,5 @@ +--- +"@lawndlwd/unused-i18n": patch +--- + +fix github workflow diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 341fa61..a73737f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: runs-on: ubuntu-22.04 needs: [typecheck] steps: - - uses: actions/checkout@v4 # v4.1.4 + - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4.0.0 with: version: 9.1.1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..2392679 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,45 @@ +name: Create Release Pull Request + +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + create-release-pr: + name: Create Release Pull Request + runs-on: ubuntu-latest + permissions: write-all + steps: + - uses: actions/checkout@v4 + + - name: Git Identity + run: | + git config --global user.name 'levende' + git config --global user.email 'lwdlwd95@gmail.com' + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: pnpm/action-setup@v4.0.0 + with: + version: 9.1.1 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - run: pnpm install + + - name: Create Release Pull Request + id: changesets + uses: changesets/action@v1 + with: + commit: 'chore: release' + title: 'chore: release' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dbe4685..2392679 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release +name: Create Release Pull Request on: push: @@ -8,11 +8,10 @@ on: concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: - release: - name: Release + create-release-pr: + name: Create Release Pull Request runs-on: ubuntu-latest permissions: write-all - steps: - uses: actions/checkout@v4 @@ -27,6 +26,7 @@ jobs: - uses: pnpm/action-setup@v4.0.0 with: version: 9.1.1 + - name: Use Node.js uses: actions/setup-node@v4 with: @@ -35,14 +35,11 @@ jobs: - run: pnpm install - - name: Create Release Pull Request or Publish to npm + - name: Create Release Pull Request id: changesets uses: changesets/action@v1 with: commit: 'chore: release' title: 'chore: release' - publish: pnpm release && npm publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_CONFIG_PROVENANCE: true