diff --git a/action.yml b/action.yml index 4291181..0cf9d0b 100644 --- a/action.yml +++ b/action.yml @@ -11,15 +11,23 @@ runs: - name: 版本號計算 id: version-calculate uses: https://gitea.jsc.idv.tw/docker-actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }} + - name: 組合釋出參數 + id: release-params + shell: bash + run: | + repository="${{ gitea.repository }}" + version="v${{ steps.version-calculate.outputs.version }}" + repository_name="${repository##*/}" + { + echo "name=${repository_name} ${version}" + echo "tag_name=${version}" + } >> "$GITHUB_OUTPUT" - name: 釋出並標註成品版本 uses: akkuman/gitea-release-action@${{ vars.ACTION_GITEA_RELEASE_VERSION }} - env: - NAME: ${{ gitea.repository##*/ }} - VERSION: v${{ steps.version-calculate.outputs.version }} with: - name: "$NAME $VERSION" - tag_name: "$VERSION" + name: ${{ steps.release-params.outputs.name }} + tag_name: ${{ steps.release-params.outputs.tag_name }} target_commitish: ${{ gitea.ref }} files: ${{ inputs.files }} - name: 清理舊成品 - uses: https://gitea.jsc.idv.tw/docker-actions/release-cleanup@${{ vars.ACTION_RELEASE_CLEANUP_VERSION }} \ No newline at end of file + uses: https://gitea.jsc.idv.tw/docker-actions/release-cleanup@${{ vars.ACTION_RELEASE_CLEANUP_VERSION }}