Add MacOS euphoria action #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: macos-euphoria | |
on: [push] | |
jobs: | |
Build-Euphoria-MacOS: | |
name: 'Euphoria for MacOS' | |
runs-on: macos-13 | |
if: | | |
contains(github.event.head_commit.message, '[all]') || | |
contains(github.event.head_commit.message, '[macos]') || | |
contains(github.event.head_commit.message, '[macos-euphoria]') || | |
contains(github.event.head_commit.message, '[euphoria]') | |
steps: | |
- name: 'Setup/Update Go' | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.22.1' | |
- name: 'Get Euphoria' | |
uses: actions/checkout@v4 | |
with: | |
repository: amnezia-vpn/euphoria | |
ref: master | |
path: euphoria | |
- name: 'Run build script' | |
working-directory: euphoria | |
run: | | |
brew install luajit | |
make | |
./amneziawg-go --version | |
- name: 'Archive artifacts' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: euphoria-macos | |
path: euphoria/amneziawg-go | |
github-release: | |
name: GitHub Release | |
needs: Build-Euphoria-MacOS | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Setup | Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Setup | Checksums | |
run: for file in $(find ./ -name '*' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done | |
- name: Zip ALL | |
run: for file in *; do zip -r ${file%.*}.zip $file; done | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: euphoria-macos.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true |