mirror of
https://github.com/AIsouler/GKD_subscription.git
synced 2025-12-23 02:05:06 +08:00
chore: actions release
This commit is contained in:
48
.github/workflows/build.yml
vendored
Normal file
48
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
if: |
|
||||
${{ contains(github.event.head_commit.message, 'chore: release') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: volta-cli/action@v3
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
|
||||
- run: pnpm install
|
||||
|
||||
- name: Release
|
||||
run: |
|
||||
pnpm run build
|
||||
|
||||
- name: Git commit
|
||||
id: commit
|
||||
run: |
|
||||
git config --local user.email github-actions[bot]@users.noreply.github.com
|
||||
git config --local user.name github-actions[bot]
|
||||
git config --global core.autocrlf true
|
||||
git config --global core.safecrlf false
|
||||
git add .
|
||||
git commit -m "CI build" -a
|
||||
continue-on-error: true
|
||||
|
||||
- name: Git push
|
||||
uses: ad-m/github-push-action@master
|
||||
if: ${{ steps.commit.outcome == 'success' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
||||
|
||||
- name: Log
|
||||
if: ${{ steps.commit.outcome != 'success' }}
|
||||
run: echo Nothing to commit.
|
||||
27
.github/workflows/check.yml
vendored
Normal file
27
.github/workflows/check.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
${{ !contains(github.event.head_commit.message, 'chore: release') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: volta-cli/action@v3
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
|
||||
- run: pnpm install
|
||||
|
||||
- run: pnpm run check
|
||||
19
.github/workflows/release-please.yml
vendored
Normal file
19
.github/workflows/release-please.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
name: release-please
|
||||
|
||||
jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@v3
|
||||
with:
|
||||
release-type: node
|
||||
package-name: release-please-action
|
||||
Reference in New Issue
Block a user