Skip to content

Commit

Permalink
Merge pull request #6 from Lawndlwd/dev
Browse files Browse the repository at this point in the history
feat: add github actions
  • Loading branch information
Lawndlwd authored May 25, 2024
2 parents 868f386 + 5b2aba0 commit 20c3953
Show file tree
Hide file tree
Showing 5 changed files with 1,882 additions and 25 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
16 changes: 16 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/cli/changelog",
{
"repo": "Lawndlwd/unused-i18n"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
44 changes: 24 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,42 @@ on:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions: write-all

steps:
- name: Checkout code
uses: actions/checkout@v2
- 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.0.2
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 20
cache: 'pnpm'

- run: pnpm install
- run: pnpm run build

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Publish to npm
run: npm publish
commit: 'chore: release'
title: 'chore: release'
publish: pnpm release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
"typecheck": "tsc --noEmit",
"start": "ts-node src/index.ts",
"test": "vitest",
"release": "pnpm build && pnpm changeset publish",
"coverage": "vitest run --coverage"
},
"dependencies": {
"@changesets/cli": "^2.27.3",
"ansi-colors": "^4.1.3",
"commander": "^12.1.0"
},
Expand Down
Loading

0 comments on commit 20c3953

Please sign in to comment.