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