fix: some errorhandling corrections
chore: updated versions
This commit is contained in:
parent
7ff3af5044
commit
aa77ad77e2
10 changed files with 71 additions and 29 deletions
|
|
@ -13,12 +13,12 @@ jobs:
|
|||
runs-on: docker
|
||||
steps:
|
||||
- name: 📤 Checkout source code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: ⚙️ Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: 1.25
|
||||
go-version: 1.26
|
||||
|
||||
- name: ⚙️ Install dependencies
|
||||
run: |
|
||||
|
|
@ -26,19 +26,19 @@ jobs:
|
|||
|
||||
- name: 👨🏻🔧 Build app
|
||||
run: |
|
||||
go build -o ${{ env.build_name }}
|
||||
CGO_ENABLED=0 go build -o "${{ env.build_name }}" -ldflags="-s -w"
|
||||
|
||||
- name: 🤠 Create release
|
||||
run: |
|
||||
set -e
|
||||
|
||||
echo "Creating release for ${{ env.GITHUB_REPOSITORY}} with tag ${{ env.GITHUB_REF_NAME }}"
|
||||
echo "Creating release for ${{ github.repository }} with tag ${{ github.ref_name }}"
|
||||
|
||||
REQUEST=$(curl --fail --request POST \
|
||||
--url ${{ env.GITHUB_API_URL }}/repos/${{ env.GITHUB_REPOSITORY }}/releases \
|
||||
--url ${{ env.GITHUB_API_URL }}/repos/${{ github.repository }}/releases \
|
||||
--header 'Authorization: token ${{ secrets.GIT_TOKEN }}' \
|
||||
--header 'content-type: application/json' \
|
||||
--data '{ "tag_name": "${{ env.GITHUB_REF_NAME }}" }')
|
||||
--data '{ "tag_name": "${{ github.ref_name }}" }')
|
||||
|
||||
ls -lh ${{ env.build_name }}
|
||||
|
||||
|
|
@ -47,6 +47,6 @@ jobs:
|
|||
echo "Uploading release asset for Release ID ${RELEASE_ID}"
|
||||
|
||||
curl --fail --request POST \
|
||||
--url ${{ env.GITHUB_API_URL }}/repos/${{ env.GITHUB_REPOSITORY }}/releases/${RELEASE_ID}/assets?name=${{ env.build_name }} \
|
||||
--url ${{ env.GITHUB_API_URL }}/repos/${{ github.repository }}/releases/${RELEASE_ID}/assets?name=${{ env.build_name }} \
|
||||
--header 'Authorization: token ${{ secrets.GIT_TOKEN }}' \
|
||||
-F 'attachment=@${{ env.build_name}}'
|
||||
Loading…
Add table
Add a link
Reference in a new issue