Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
cugu committed Oct 14, 2024
1 parent da72229 commit 5c66e40
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 128 deletions.
54 changes: 39 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches: [ master ]
pull_request:
release: { types: [ published ] }

jobs:
fmt:
Expand Down Expand Up @@ -87,18 +88,27 @@ jobs:

- run: go build .

- uses: actions/upload-artifact@v4
with:
name: artifactcollector ${{ matrix.os }}
path: artifactcollector

- uses: softprops/action-gh-release@v2
with:
files: bin
if: matrix.os == 'macos-latest' && github.event_name == 'release'
- uses: softprops/action-gh-release@v2
with:
files: bin
if: matrix.os == 'ubuntu-latest' && github.event_name == 'release'

- run: sudo ./artifactcollector

- name: Move Binary
- name: move files
run: |
mkdir bin output
mv artifactcollector bin
mkdir output
mv *.zip output
- uses: actions/upload-artifact@v4
with:
name: artifactcollector ${{ matrix.os }}
path: bin
- uses: actions/upload-artifact@v4
with:
name: output ${{ matrix.os }}
Expand All @@ -117,19 +127,23 @@ jobs:

- run: make build-win

- uses: actions/upload-artifact@v4
with:
name: artifactcollector windows-latest
path: ./build/bin/artifactcollector.exe

- uses: softprops/action-gh-release@v2
with:
files: bin
if: github.event_name == 'release'

- run: ./build/bin/artifactcollector.exe

- name: Move Binary
- name: move files
run: |
mkdir bin output
mv ./build/bin/artifactcollector.exe bin
mkdir output
mv *.zip output
- name: Upload artifactcollector
uses: actions/upload-artifact@v4
with:
name: artifactcollector windows-latest
path: bin
- uses: actions/upload-artifact@v4
with:
name: output windows-latest
Expand All @@ -148,6 +162,11 @@ jobs:
name: artifactcollector (Windows 2000, 32bit)
path: build/bin/artifactcollector2k.exe

- uses: softprops/action-gh-release@v2
with:
files: build/bin/artifactcollector2k.exe
if: github.event_name == 'release'

winxp:
name: artifactcollector (winxp)
runs-on: ubuntu-latest
Expand All @@ -160,3 +179,8 @@ jobs:
with:
name: artifactcollector (Windows XP, 32bit)
path: build/bin/artifactcollectorxp.exe

- uses: softprops/action-gh-release@v2
with:
files: build/bin/artifactcollectorxp.exe
if: github.event_name == 'release'
113 changes: 0 additions & 113 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit 5c66e40

Please sign in to comment.