Skip to content

Commit

Permalink
feat: consolidate workflows into one with publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jae1911 committed Dec 3, 2024
1 parent 26bae60 commit 4a0a737
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 115 deletions.
42 changes: 41 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- main
paths-ignore:
- "**/*.md"
release:
types: [published]

jobs:
buildLinuxArm:
Expand Down Expand Up @@ -60,7 +62,7 @@ jobs:
name: android-dist
retention-days: 1
buildWindows:
needs: [buildLinux]
needs: [buildLinux, buildLinuxArm]
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -99,3 +101,41 @@ jobs:
with:
path: Wrapper/FreeImage.NET/cs/Library/nupkgs
name: nuget-dist

upload-release:
needs: [buildsWindows, buildLinux, buildLinuxArm]
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: ./dist
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_TOKEN }}
- name: Push Nuget
run: nuget push ./dist/nuget-dist/*.nupkg -ApiKey ${{ secrets.NUGET_TOKEN }} -Source https://api.nuget.org/v3/index.json
- name: Prep Archives
run: |
tar -czvf linux-dist.tar.gz ./dist/linux-dist
tar -czvf android-dist.tar.gz ./dist/android-dist
tar -czvf arm-dist.tar.gz ./dist/arm-dist
zip -r win32-dist.zip ./dist/win32-dist
zip -r win64-dist.zip ./dist/win64-dist
- name: Upload Tarbells
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./*.tar.gz
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Upload Zips
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./*.zip
tag: ${{ github.ref }}
overwrite: true
file_glob: true
114 changes: 0 additions & 114 deletions .github/workflows/publish.yml

This file was deleted.

0 comments on commit 4a0a737

Please sign in to comment.