-
Notifications
You must be signed in to change notification settings - Fork 18
Add build/release workflow for Linux, Windows, MacOS, FreeBSD and OpenBSD #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| name: Release binaries | ||
|
|
||
| concurrency: | ||
| group: release | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "**" | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-linux: | ||
| name: Build Linux | ||
| runs-on: ubuntu-24.04 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JFYI: not sure whether this applies in case of |
||
| strategy: | ||
| matrix: | ||
| arch: [amd64, arm64, armhf, i386, mips] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Build | ||
| run: | | ||
| cd src/cli | ||
| make -j | ||
| mv cli bbk-linux-${{ matrix.arch }} | ||
| - name: Upload | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: bbk-linux-${{ matrix.arch }} | ||
| path: src/cli/bbk-linux-${{ matrix.arch }} | ||
|
|
||
| build-macos: | ||
| name: Build macOS | ||
| runs-on: macos-13 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - run: | | ||
| cd src/cli | ||
| make -j | ||
| mv cli bbk-macos-amd64 | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: bbk-macos-amd64 | ||
| path: src/cli/bbk-macos-amd64 | ||
|
|
||
| build-windows: | ||
| name: Build Windows | ||
| runs-on: windows-2025 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Add msbuild | ||
| uses: microsoft/setup-msbuild@v2 | ||
|
|
||
| - name: Build | ||
| run: | | ||
| msbuild src/wincli/wincli.sln /p:Configuration=Release /m | ||
| mv src/wincli/x64/Release/wincli.exe bbk-windows-amd64.exe | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: bbk-windows-amd64 | ||
| path: bbk-windows-amd64.exe | ||
|
|
||
| build-freebsd: | ||
| name: Build FreeBSD | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: vmactions/freebsd-vm@v1 | ||
| with: | ||
| run: | | ||
| pkg install -y gmake gcc | ||
| cd src/cli && gmake && mv cli bbk-freebsd-amd64 | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: bbk-freebsd-amd64 | ||
| path: src/cli/bbk-freebsd-amd64 | ||
|
|
||
| build-openbsd: | ||
| name: Build OpenBSD | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: vmactions/openbsd-vm@v1 | ||
| with: | ||
| run: | | ||
| pkg_add gmake gcc | ||
| cd src/cli && gmake && mv cli bbk-openbsd-amd64 | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: bbk-openbsd-amd64 | ||
| path: src/cli/bbk-openbsd-amd64 | ||
|
|
||
| release: | ||
| name: Create GitHub Release | ||
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
| needs: | ||
| - build-linux | ||
| - build-macos | ||
| - build-windows | ||
| - build-freebsd | ||
| - build-openbsd | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Download artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: artifacts/ | ||
|
|
||
| - name: Generate release notes | ||
| run: git log -1 --pretty='%s' > RELEASE.md | ||
|
|
||
| - name: Publish release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: artifacts/**/* | ||
| body_path: RELEASE.md | ||
Uh oh!
There was an error while loading. Please reload this page.