Another try at releasing.
This commit is contained in:
parent
31a7fb255a
commit
1956094e32
1 changed files with 19 additions and 11 deletions
|
@ -13,10 +13,9 @@ jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-docker
|
runs-on: ubuntu-docker
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Check out repository code
|
||||||
with:
|
uses: actions/checkout@v4
|
||||||
fetch-depth: 0
|
- 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.x'
|
||||||
|
@ -33,10 +32,19 @@ 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: Use Go Action
|
- name: Create Release
|
||||||
id: use-go-action
|
id: create_release
|
||||||
uses: softprops/action-gh-release
|
env:
|
||||||
with:
|
GITEA_TOKEN: ${{ secrets.CI_PACKAGES_RW }}
|
||||||
files: |-
|
run: |
|
||||||
bin/**
|
RESPONSE=$(curl -s -X POST -H "Content-Type: application/json" -H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
-d '{
|
||||||
|
"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)"
|
||||||
|
|
Loading…
Reference in a new issue