Another try with gitea package.
This commit is contained in:
parent
1956094e32
commit
df385055f4
1 changed files with 34 additions and 17 deletions
|
@ -18,7 +18,7 @@ jobs:
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: '>=1.x'
|
go-version: '>=1.22'
|
||||||
- name: release-build-linux-amd64
|
- name: release-build-linux-amd64
|
||||||
run: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/opendtu-logger-${{ github.ref_name }}-linux-amd64
|
run: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/opendtu-logger-${{ github.ref_name }}-linux-amd64
|
||||||
- name: release-build-linux-arm64
|
- name: release-build-linux-arm64
|
||||||
|
@ -32,19 +32,36 @@ jobs:
|
||||||
- name: release-build-darwin-arm64
|
- name: release-build-darwin-arm64
|
||||||
run: GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/opendtu-logger-${{ github.ref_name }}-darwin-arm64
|
run: GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/opendtu-logger-${{ github.ref_name }}-darwin-arm64
|
||||||
|
|
||||||
- name: Create Release
|
- name: Use Go Action
|
||||||
id: create_release
|
id: use-go-action
|
||||||
env:
|
uses: https://gitea.com/actions/release-action@main
|
||||||
GITEA_TOKEN: ${{ secrets.CI_PACKAGES_RW }}
|
with:
|
||||||
run: |
|
files: |-
|
||||||
RESPONSE=$(curl -s -X POST -H "Content-Type: application/json" -H "Authorization: token ${GITEA_TOKEN}" \
|
bin/**
|
||||||
-d '{
|
api_key: '${{secrets.CI_PACKAGES_RW}}'
|
||||||
"tag_name": "${{ github.ref_name }}",
|
|
||||||
"target_commitish": "main",
|
# - name: Create Release
|
||||||
"name": "Release ${{ github.ref_name }}",
|
# id: create_release
|
||||||
"body": "Description of the release",
|
# env:
|
||||||
"draft": false,
|
# GITEA_TOKEN: ${{ secrets.CI_PACKAGES_RW }}
|
||||||
"prerelease": false
|
# run: |
|
||||||
}' \
|
# RESPONSE=$(curl -s -X POST -H "Content-Type: application/json" -H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
"https://git.hollander.online/api/v1/repos/${{ gitea.repository_owner }}/${{ gitea.event.repository.name }}/releases")
|
# -d '{
|
||||||
echo "::set-output name=id::$(echo $RESPONSE | jq .id)"
|
# "tag_name": "${{ github.ref_name }}",
|
||||||
|
# "target_commitish": "main",
|
||||||
|
# "name": "Release ${{ github.ref_name }}",
|
||||||
|
# "body": "Description of the release",
|
||||||
|
# "draft": false,
|
||||||
|
# "prerelease": false
|
||||||
|
# }' \
|
||||||
|
# "https://git.hollander.online/api/v1/repos/${{ gitea.repository_owner }}/${{ gitea.event.repository.name }}/releases")
|
||||||
|
# echo "::set-output name=id::$(echo $RESPONSE | jq .id)"
|
||||||
|
|
||||||
|
# - name: Upload Assets
|
||||||
|
# env:
|
||||||
|
# GITEA_TOKEN: ${{ secrets.CI_PACKAGES_RW }}
|
||||||
|
# run: |
|
||||||
|
# for BINARY in bin/*; do
|
||||||
|
# curl -X POST -H "Authorization: token ${GITEA_TOKEN}" -H "Content-Type: application/octet-stream" --data-binary "@$BINARY" \
|
||||||
|
# "https://git.hollander.online/api/v1/repos/${{ gitea.repository_owner }}/${{ gitea.event.repository.name }}/releases/${{ steps.create_release.outputs.id }}/assets?name=$(basename $BINARY)"
|
||||||
|
# done
|
Loading…
Reference in a new issue