-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Dependabot | ||
on: pull_request | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Approve and auto-merge a PR | ||
run: | | ||
gh pr merge --auto --squash "$PR_URL" | ||
gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish Package to npmjs | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
npm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
github: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Setup .npmrc file to publish to GitHub Packages | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
types: [ closed ] | ||
|
||
name: Create Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Extract version from package.json | ||
uses: sergeysova/jq-action@v2 | ||
id: version | ||
with: | ||
cmd: 'jq .devDependencies.unocss package.json -r' | ||
- name: Update package version in package.json | ||
uses: sergeysova/jq-action@v2 | ||
with: | ||
cmd: 'jq \'.version = "${{ steps.version.outputs.value }}"\' package.json' | ||
- uses: actions4git/setup-git@v1 | ||
- run: | | ||
git add package.json | ||
git tag --force v${{ steps.version.outputs.value }} | ||
git commit --message 'v${{ steps.version.outputs.value }}' | ||
git push origin main --force | ||
- name: Create Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.version.outputs.value }} | ||
release_name: Release ${{ steps.version.outputs.value }} | ||
body: | | ||
Changes in this Release | ||
- Unocss bumped to ${{ steps.version.outputs.value }} | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters