From db2b5ca8337a8def70e728199b0e070e3f74b2c8 Mon Sep 17 00:00:00 2001 From: leafus Date: Sun, 29 Sep 2024 04:24:02 +0200 Subject: [PATCH] Update .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 64953e6..e1cc58d 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -21,13 +21,13 @@ jobs: - name: Build Go binary run: | go mod tidy - go build -o s3-client + go build -o s3-client - name: Get latest commit ID id: get_commit run: | commit_id=$(git rev-parse HEAD) - echo "commit_id=$commit_id" >> $GITHUB_ENV + echo "commit_id=$commit_id" >> $GITHUB_ENV - name: Get latest version and increment id: create_version @@ -43,7 +43,7 @@ jobs: echo "new_version=$new_version" >> $GITHUB_ENV git tag $new_version - git push origin $new_version + git push origin $new_version - name: Create Release id: create_release @@ -54,7 +54,7 @@ jobs: release_description: | Automatic release by Gitea CI Release version ${{ env.new_version }}. - Commit ID: ${{ env.commit_id }} + Commit ID: ${{ env.commit_id }} draft: false prerelease: false env: @@ -64,13 +64,13 @@ jobs: - name: Save release URL run: echo "upload_url=${{ steps.create_release.outputs.upload_url }}" >> $GITHUB_ENV - - name: List files in current directory - run: ls -la - - name: Upload Go binary to release uses: actions/upload-release-asset@v1 with: upload_url: ${{ env.upload_url }} asset_path: ./s3-client asset_name: s3-client_${{ env.new_version }}_linux_amd64 - asset_content_type: application/octet-stream \ No newline at end of file + asset_content_type: application/octet-stream + env: + GITEA_TOKEN: ${{ secrets.TOKEN }} + GITHUB_TOKEN: ${{ secrets.TOKEN }} \ No newline at end of file