chore(工作流程): 重構 CI 與 master 流程改用 gitea release 與 commit tag
This commit is contained in:
@@ -4,27 +4,18 @@ on:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
name: 1. BUILD
|
||||
runs-on: ubuntu
|
||||
outputs:
|
||||
version: ${{ steps.calculate-version.outputs.version }}
|
||||
steps:
|
||||
- name: Calculate Version
|
||||
id: calculate-version
|
||||
env:
|
||||
VERSION: 0.0.1
|
||||
run: echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
deploy:
|
||||
name: 2. DEPLOY
|
||||
name: DEPLOY
|
||||
runs-on: ubuntu
|
||||
needs: [build]
|
||||
env:
|
||||
VERSION: ${{ needs.build.outputs.version }}
|
||||
COMMIT_SHA: ${{ gitea.event.commits[1].id }}
|
||||
steps:
|
||||
- name: Publishing Release
|
||||
uses: akkuman/gitea-release-action@${{ vars.ACTION_GITEA_RELEASE_VERSION }}
|
||||
- name: Source Code Checkout
|
||||
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
|
||||
with:
|
||||
name: "${{ gitea.event.repository.name }} v${{ env.VERSION }}"
|
||||
tag_name: "v${{ env.VERSION }}"
|
||||
target_commitish: ${{ gitea.sha }}
|
||||
fetch-depth: 0
|
||||
- name: Get Commit Tag
|
||||
id: commit
|
||||
run: echo "tag=$(git describe --contains ${{ env.COMMIT_SHA }})" >> $GITEA_OUTPUT
|
||||
- name: Show Tag
|
||||
run: echo "${{ steps.commit.outputs.tag }}"
|
||||
|
||||
Reference in New Issue
Block a user