Skip to content

Commit bd13a35

Browse files
committed
fix(ci): Fix release
Signed-off-by: dark0dave <dark0dave@mykolab.com>
1 parent ac0d0f7 commit bd13a35

1 file changed

Lines changed: 27 additions & 29 deletions

File tree

.github/workflows/main.yaml

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,16 @@ jobs:
3939
container: golang:1.23-alpine3.20
4040
strategy:
4141
matrix:
42-
os: [linux, darwin, windows]
43-
arch: [arm64, amd64]
44-
exclude:
45-
- os: windows
42+
include:
43+
- os: darwin
4644
arch: arm64
45+
suffix: ''
46+
- os: linux
47+
arch: amd64
48+
suffix: ''
49+
- os: windows
50+
arch: amd64
51+
suffix: .exe
4752
steps:
4853
- name: Install git
4954
run: apk add --update --no-cache git
@@ -54,16 +59,15 @@ jobs:
5459
set-safe-directory: true
5560
- name: Build
5661
run: |
57-
mkdir release-artifacts
58-
GOFLAGS=-buildvcs=false GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o release-artifacts ./...
62+
GOFLAGS=-buildvcs=false GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o . ./...
5963
shell: sh
6064
env:
6165
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6266
- name: Archive release artifacts
6367
uses: actions/upload-artifact@v4
6468
with:
65-
name: release-artifacts-${{ matrix.os }}-${{ matrix.arch }}
66-
path: release-artifacts
69+
name: infinity-dialog-${{ matrix.os }}-${{ matrix.arch }}
70+
path: ./infinity_dialog${{ matrix.suffix }}
6771
create-release:
6872
name: Create Release
6973
needs:
@@ -87,48 +91,42 @@ jobs:
8791
args: --verbose --latest
8892
env:
8993
OUTPUT: changelog.md
90-
- uses: actions/download-artifact@v4
91-
with:
92-
name: release-artifacts-linux-amd64
93-
path: release-artifacts
9494
- name: Get the tag
9595
id: get_tag
9696
run: echo ::set-output name=git_tag::${GITHUB_REF/refs\/tags\//}
9797
- name: Create Release
9898
id: create_release
99-
uses: actions/create-release@v1
100-
env:
101-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99+
uses: ncipollo/release-action@v1.14.0
102100
with:
103-
tag_name: ${{ steps.get_tag.outputs.git_tag }}
104-
release_name: ${{ steps.get_tag.outputs.git_tag }}
105-
body_path: ${{ steps.git-cliff.outputs.changelog }}
106-
draft: ${{ startsWith(steps.get_tag.outputs.git_tag, 'nightly') != true }}
107-
prerelease: ${{ startsWith(steps.get_tag.outputs.git_tag, 'nightly') }}
101+
bodyFile: ./changelog.md
108102
release-artifacts:
109103
name: Release Artifacts
110104
needs:
111105
[create-release]
112106
runs-on: ubuntu-latest
113107
strategy:
114108
matrix:
115-
os: [linux, darwin, windows]
116-
arch: [arm64, amd64]
117-
exclude:
118-
- os: windows
109+
include:
110+
- os: darwin
119111
arch: arm64
112+
suffix: ''
113+
- os: linux
114+
arch: amd64
115+
suffix: ''
116+
- os: windows
117+
arch: amd64
118+
suffix: .exe
120119
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
121120
steps:
122121
- uses: actions/download-artifact@v4
123122
with:
124-
name: release-artifacts-${{ matrix.os }}-${{ matrix.arch }}
125-
path: release-artifacts
123+
name: infinity-dialog-${{ matrix.os }}-${{ matrix.arch }}
126124
- name: Upload Release Asset - ${{ matrix.os }}-${{ matrix.arch }}
127125
uses: actions/upload-release-asset@v1
128126
env:
129127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130128
with:
131129
upload_url: ${{ needs.create-release.outputs.upload_url }}
132-
asset_path: ./release-artifacts/infinity_dialog-${{ needs.create-release.outputs.tag_name }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
133-
asset_name: infinity_dialog-${{ needs.create-release.outputs.tag_name }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
134-
asset_content_type: application/tar+gzip
130+
asset_path: ./infinity_dialog${{ matrix.suffix }}
131+
asset_name: infinity-dialog-${{ matrix.os }}${{ matrix.suffix }}
132+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)