Update .gitea/workflows/build.yaml
Some checks failed
Release Version / build (push) Failing after 48s

This commit is contained in:
leafus 2024-09-29 04:24:02 +02:00
parent de5220eec4
commit db2b5ca833

View File

@ -21,13 +21,13 @@ jobs:
- name: Build Go binary - name: Build Go binary
run: | run: |
go mod tidy go mod tidy
go build -o s3-client go build -o s3-client
- name: Get latest commit ID - name: Get latest commit ID
id: get_commit id: get_commit
run: | run: |
commit_id=$(git rev-parse HEAD) 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 - name: Get latest version and increment
id: create_version id: create_version
@ -43,7 +43,7 @@ jobs:
echo "new_version=$new_version" >> $GITHUB_ENV echo "new_version=$new_version" >> $GITHUB_ENV
git tag $new_version git tag $new_version
git push origin $new_version git push origin $new_version
- name: Create Release - name: Create Release
id: create_release id: create_release
@ -54,7 +54,7 @@ jobs:
release_description: | release_description: |
Automatic release by Gitea CI Automatic release by Gitea CI
Release version ${{ env.new_version }}. Release version ${{ env.new_version }}.
Commit ID: ${{ env.commit_id }} Commit ID: ${{ env.commit_id }}
draft: false draft: false
prerelease: false prerelease: false
env: env:
@ -64,13 +64,13 @@ jobs:
- name: Save release URL - name: Save release URL
run: echo "upload_url=${{ steps.create_release.outputs.upload_url }}" >> $GITHUB_ENV 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 - name: Upload Go binary to release
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
with: with:
upload_url: ${{ env.upload_url }} upload_url: ${{ env.upload_url }}
asset_path: ./s3-client asset_path: ./s3-client
asset_name: s3-client_${{ env.new_version }}_linux_amd64 asset_name: s3-client_${{ env.new_version }}_linux_amd64
asset_content_type: application/octet-stream asset_content_type: application/octet-stream
env:
GITEA_TOKEN: ${{ secrets.TOKEN }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}