Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: github workflow #14

Merged
merged 1 commit into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading