Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
559cb45312 | ||
|
|
8cf6a41f3c | ||
|
|
b418abbbac | ||
|
|
94f0e99392 | ||
|
|
e382432c7b | ||
|
|
dfaa8530e1 | ||
|
|
3a95e3e96b | ||
|
|
6041e730fa | ||
|
|
20d104ab9b | ||
|
|
f63edd5214 | ||
|
|
22d14c0e9f | ||
|
|
f03aa4ba23 |
@@ -10,7 +10,7 @@ jobs:
|
|||||||
- name: 發布專案
|
- name: 發布專案
|
||||||
uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }}
|
uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }}
|
||||||
with:
|
with:
|
||||||
tag_name: "v0.1.6"
|
tag_name: "v0.2.1"
|
||||||
- name: 清理舊版本 (保留最新2個)
|
- name: 清理舊版本 (保留最新2個)
|
||||||
uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }}
|
uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }}
|
||||||
with:
|
with:
|
||||||
@@ -25,8 +25,16 @@ jobs:
|
|||||||
version: ${{ steps.version.outputs.version }}
|
version: ${{ steps.version.outputs.version }}
|
||||||
steps:
|
steps:
|
||||||
- name: 計算版本號
|
- name: 計算版本號
|
||||||
|
uses: https://gitea.jsc.idv.tw/actions/calculate-version@v0.2.1
|
||||||
|
- name: 顯示工作目錄
|
||||||
|
run: |
|
||||||
|
echo "工作目錄: $(pwd)"
|
||||||
|
ls -la $(pwd)
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
|
- name: 輸出版本號
|
||||||
id: version
|
id: version
|
||||||
uses: https://gitea.jsc.idv.tw/actions/calculate-version@v0.1.6
|
run: cat VERSION.txt >> $GITHUB_OUTPUT
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
test:
|
test:
|
||||||
name: "TEST > 測試專案"
|
name: "TEST > 測試專案"
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
|||||||
14
action.yaml
14
action.yaml
@@ -1,23 +1,13 @@
|
|||||||
name: 'CALCULATE VERSION'
|
name: 'CALCULATE VERSION'
|
||||||
description: '計算版本號'
|
description: '計算版本號'
|
||||||
author: 'Jeffery'
|
author: 'Jeffery'
|
||||||
# inputs:
|
|
||||||
# RUNNER_TOKEN:
|
|
||||||
# description: 'Gitea Runner 用來存取的 Token,ex: ${{ secrets.RUNNER_TOKEN }}'
|
|
||||||
# required: true
|
|
||||||
outputs:
|
outputs:
|
||||||
version:
|
version:
|
||||||
description: '計算出的新版本號'
|
description: '計算出的版本號'
|
||||||
value: ${{ steps.calculate.outputs.version }}
|
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
env:
|
env:
|
||||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||||
RUNNER_TOKEN: ${{ secrets.RUNNER_TOKEN }}
|
RUNNER_TOKEN: ${{ secrets.RUNNER_TOKEN }}
|
||||||
using: 'composite'
|
|
||||||
steps:
|
|
||||||
- name: 將檔案寫到輸出
|
|
||||||
id: calculate
|
|
||||||
run: echo "VERSION.txt" >> $GITHUB_OUTPUT
|
|
||||||
@@ -71,4 +71,4 @@ PATCH=$((PATCH + 1))
|
|||||||
NEW_VERSION="$MAJOR.$MINOR.$PATCH" && echo "NEW_VERSION=$NEW_VERSION"
|
NEW_VERSION="$MAJOR.$MINOR.$PATCH" && echo "NEW_VERSION=$NEW_VERSION"
|
||||||
|
|
||||||
# 將版本輸出到環境變數
|
# 將版本輸出到環境變數
|
||||||
echo "version=$NEW_VERSION" >> "VERSION.txt"
|
echo "version=$NEW_VERSION" > /workspace/VERSION.txt
|
||||||
Reference in New Issue
Block a user