Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/DataZooDE/flapi
Browse files Browse the repository at this point in the history
  • Loading branch information
Joachim Rosskopf committed Dec 30, 2024
2 parents 42a47e0 + 4533081 commit fa58412
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 51 deletions.
40 changes: 1 addition & 39 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build flAPI

permissions:
contents: read
contents: write
packages: write
issues: write
pull-requests: write
Expand Down Expand Up @@ -186,41 +186,3 @@ jobs:
path: build/universal/flapi
if-no-files-found: error
retention-days: 90

publish-binaries:
needs: [linux-build, osx-universal, windows-build]
runs-on: ubuntu-24.04
steps:
- name: Download Linux Artifacts
uses: actions/download-artifact@v4
with:
name: flapi-linux-amd64
path: ./artifacts/linux/amd64

- name: Download Linux ARM64 Artifacts
uses: actions/download-artifact@v4
with:
name: flapi-linux-arm64
path: ./artifacts/linux/arm64

- name: Download macOS Artifacts
uses: actions/download-artifact@v4
with:
name: flapi-macos-universal
path: ./artifacts/macos

- name: Download Windows Artifacts
uses: actions/download-artifact@v4
with:
name: flapi-windows-amd64
path: ./artifacts/windows/amd64

- name: Publish to GitHub Packages
run: |
gh release create ${{ github.sha }} \
./artifacts/linux/amd64/flapi#flapi-linux-amd64 \
./artifacts/linux/arm64/flapi#flapi-linux-arm64 \
./artifacts/macos/flapi#flapi-macos-universal \
./artifacts/windows/amd64/flapi.exe#flapi-windows-amd64 \
--title "flAPI Release ${{ github.sha }}" \
--notes "Automated release of flAPI binaries."
43 changes: 31 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,38 @@ on:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
publish-binaries:
runs-on: ubuntu-24.04
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
- uses: actions/checkout@v4
with:
submodules: recursive

# ... same build steps as in build.yaml ...
- name: Download Linux Artifacts
uses: actions/download-artifact@v4
with:
name: flapi-linux-amd64
path: ./artifacts/linux/amd64

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: build/release/flapi
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download Linux ARM64 Artifacts
uses: actions/download-artifact@v4
with:
name: flapi-linux-arm64
path: ./artifacts/linux/arm64

- name: Download macOS Artifacts
uses: actions/download-artifact@v4
with:
name: flapi-macos-universal
path: ./artifacts/macos

- name: Publish to GitHub Packages
run: |
gh release create ${{ github.sha }} \
./artifacts/linux/amd64/flapi#flapi-linux-amd64 \
./artifacts/linux/arm64/flapi#flapi-linux-arm64 \
./artifacts/macos/flapi#flapi-macos-universal \
--title "flAPI Release ${{ github.sha }}" \
--notes "Automated release of flAPI binaries."

0 comments on commit fa58412

Please sign in to comment.