Update README.md #84
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: GitHub Actions Demo | |
on: [push] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
#if: startsWith(github.ref, '/refs/heads/feature/WindowsTravisCI') | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-12, | |
# ubuntu-20.04, | |
windows-latest | |
] | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Install Dependencies (Linux) | |
run: | | |
echo "Linux {{matrix.config.os}}" | |
# setup developer tools | |
sudo apt-get update | |
sudo apt-get install curl git git-lfs gvfs | |
sudo apt-get install desktop-file-utils gtk-sharp3-gapi libappindicator3-0.1-cil-dev libdbus-glib2.0-cil-dev libgtk3.0-cil-dev libnotify3.0-cil-dev libsoup2.4-dev libtool-bin libwebkit2gtk-4.0 meson mono-devel mono-mcs xsltproc | |
# checkout and build requirement soup-sharp | |
git clone https://github.com/hbons/soup-sharp | |
cd soup-sharp/ | |
./autogen.sh | |
make | |
sudo make install | |
# checkout and build requirement webkit2-sharp | |
git clone https://github.com/hbons/webkit2-sharp | |
cd webkit2-sharp/ | |
./autogen.sh | |
make | |
sudo make install | |
# checkout and build requirement libappindicator3-dev | |
sudo apt-get install libappindicator3-dev | |
git clone https://github.com/hbons/appindicator-sharp | |
cd appindicator-sharp/ | |
./autogen.sh | |
make | |
sudo make install | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Install Dependencies (Windows) | |
run: | | |
echo "Windows {{matrix.config.os}}" | |
choco install -y wixtoolset --version=3.14.1 | |
choco install tartool | |
choco install unzip | |
if: matrix.os == 'windows-latest' | |
- name: Install Dependencies (macOS) | |
run: | | |
echo "macOS {{matrix.config.os}}" | |
brew install autoconf automake libtool pkg-config | |
if: matrix.os == 'macos-12' | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | |
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | |
- run: git status | |
- name: Compile (macOS) | |
run: | | |
msbuild SparkleShare.sln /target:SparkleShare_Mac:Rebuild /p:Configuration=ReleaseDist /p:Platform="Any CPU" -m | |
mv ./SparkleShare/Mac/bin/ReleaseDist/SparkleShare.app . | |
zip -r ./SparkleShare-MacOs-${GITHUB_REF##*/}.zip ./SparkleShare.app | |
if: matrix.os == 'macos-12' | |
- name: Compile (Linux) | |
run: | | |
meson build/ | |
ninja -C build/ | |
sudo ninja install -C build/ | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Compile (Windows) | |
run: | | |
./SparkleShare/Windows/build.cmd installer | |
cp ./SparkleShare/Windows/SparkleShare.msi SparkleShare-Windows-${GITHUB_REF##*/}.msi | |
if: matrix.os == 'windows-latest' | |
- name: Publish | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: 'SparkleShare-*' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: echo "🍏 This job's status is ${{ job.status }}." |