Merge branch 'develop' #91
Workflow file for this run
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: Create Linux release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
env: | |
RELEASE_VERSION: ${{ github.ref_name }} | |
LINUX_BIN_PATH: uffizzi-linux | |
DARWIN_BIN_PATH: uffizzi-darwin | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
code-quality: | |
name: Test and Lint | |
uses: ./.github/workflows/code-quality.yml | |
gem-release: | |
needs: | |
- code-quality | |
uses: ./.github/workflows/gem-release.yml | |
secrets: inherit | |
make-binary: | |
needs: | |
- code-quality | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-12] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: 'Install Linux dependencies' | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt update | |
sudo apt install -y build-essential squashfs-tools curl gcc make bison | |
- name: 'Install MacOs dependencies' | |
if: matrix.os == 'macos-12' | |
run: | | |
brew install squashfs | |
- uses: actions/checkout@v2 | |
- name: 'Set up Ruby' | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0.3' | |
- name: 'Create Linux Bin' | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
wget https://github.com/pmq20/ruby-packer/releases/download/linux-x64/rubyc | |
chmod +x ./rubyc | |
./rubyc --openssl-dir=/etc/ssl ./uffizzi --output=${{ env.LINUX_BIN_PATH }} | |
- name: 'Create Darwin Bin' | |
if: matrix.os == 'macos-12' | |
run: | | |
export PATH="$(brew --prefix)/opt/openssl@1.1/bin:$PATH" | |
export LDFLAGS="-L$(brew --prefix)/opt/openssl@1.1/lib" | |
export CPPFLAGS="-I$(brew --prefix)/opt/openssl@1.1/include" | |
export PKG_CONFIG_PATH="$(brew --prefix)/opt/openssl@1.1/lib/pkgconfig" | |
export SSL_CERT_FILE=$(ruby -e "require 'openssl'; puts OpenSSL::X509::DEFAULT_CERT_FILE") | |
wget https://github.com/pmq20/ruby-packer/releases/download/darwin-x64/rubyc | |
chmod +x ./rubyc | |
./rubyc --openssl-dir=/etc/ssl ./uffizzi --output=${{ env.DARWIN_BIN_PATH }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
if: matrix.os == 'ubuntu-20.04' | |
with: | |
name: ${{ env.LINUX_BIN_PATH }} | |
path: ${{ env.LINUX_BIN_PATH }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
if: matrix.os == 'macos-12' | |
with: | |
name: ${{ env.DARWIN_BIN_PATH }} | |
path: ${{ env.DARWIN_BIN_PATH }} | |
create_release: | |
runs-on: ubuntu-latest | |
needs: | |
- make-binary | |
steps: | |
- name: Download Linux Bin | |
uses: actions/download-artifact@master | |
with: | |
name: ${{ env.LINUX_BIN_PATH }} | |
- name: Download Macos Bin | |
uses: actions/download-artifact@master | |
with: | |
name: ${{ env.DARWIN_BIN_PATH }} | |
- name: Generate release notes | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: ${{ env.RELEASE_VERSION }} | |
name: ${{ env.RELEASE_VERSION }} | |
files: | | |
${{ github.workspace }}/${{ env.LINUX_BIN_PATH }} | |
${{ github.workspace }}/${{ env.DARWIN_BIN_PATH }} | |
generate_release_notes: true |