mirror of
https://github.com/yanhao98/semantic-release-action.git
synced 2025-07-12 23:30:48 +08:00
feat: first commit
This commit is contained in:
22
.github/workflows/ci.yaml
vendored
Normal file
22
.github/workflows/ci.yaml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: 持续集成
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
concurrency:
|
||||
group: 'ci'
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
TZ: Asia/Shanghai
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
permissions: # Job-level permissions configuration starts here
|
||||
contents: write # 'write' access to repository contents
|
||||
pull-requests: write # 'write' access to pull requests
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- uses: yanhao98/semantic-release-example@main
|
27
.github/workflows/semantic-release-action.yaml.off
vendored
Normal file
27
.github/workflows/semantic-release-action.yaml.off
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: cycjimmy/semantic-release-action
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Semantic Release
|
||||
uses: cycjimmy/semantic-release-action@v4
|
||||
with:
|
||||
dry_run: true
|
||||
id: semantic # Need an `id` for output variables
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Do something when a new release published
|
||||
if: steps.semantic.outputs.new_release_published == 'true'
|
||||
run: |
|
||||
echo ${{ steps.semantic.outputs.new_release_version }}
|
||||
echo ${{ steps.semantic.outputs.new_release_major_version }}
|
||||
echo ${{ steps.semantic.outputs.new_release_minor_version }}
|
||||
echo ${{ steps.semantic.outputs.new_release_patch_version }}
|
35
.github/workflows/semantic-release.yaml.off
vendored
Normal file
35
.github/workflows/semantic-release.yaml.off
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: 持续集成
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
concurrency:
|
||||
group: 'ci'
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
TZ: Asia/Shanghai
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
permissions: # Job-level permissions configuration starts here
|
||||
contents: write # 'write' access to repository contents
|
||||
pull-requests: write # 'write' access to pull requests
|
||||
steps:
|
||||
- uses: yanhao98/composite-actions/setup-node-environment@main
|
||||
# - run: npx semantic-release@24
|
||||
# if: ${{ vars.GITEA_ACTIONS != 'true' }}
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# --dry-run
|
||||
|
||||
- run: node run.mjs
|
||||
id: semantic-release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Get the output
|
||||
run: echo "The output was ${{ steps.semantic-release.outputs.version }}"
|
||||
# - run: git status
|
||||
# - name: 检查是否有未推送的 tag
|
||||
# run: git tag -l --sort=-creatordate | while read tag; do git ls-remote --tags origin | grep -q "$tag" || echo "$tag"; done
|
Reference in New Issue
Block a user