Skip to content

Commit

Permalink
fit: fix github workflow (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lawndlwd authored May 25, 2024
1 parent 3977cf1 commit 6ed65fc
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/shaggy-falcons-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lawndlwd/unused-i18n": patch
---

fix github workflow
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
version: 9.1.1
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: pnpm/[email protected]
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 }}
13 changes: 5 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Create Release Pull Request

on:
push:
Expand All @@ -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

Expand All @@ -27,6 +26,7 @@ jobs:
- uses: pnpm/[email protected]
with:
version: 9.1.1

- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -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

0 comments on commit 6ed65fc

Please sign in to comment.