diff options
author | Christian Duerr <contact@christianduerr.com> | 2020-11-06 23:52:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-06 23:52:56 +0000 |
commit | 43d1afbeeb9cba0ce1281a9cf2223b5bd71664d2 (patch) | |
tree | 874e6352f8733ee61a28170bb171eb6acb6e5e19 /.github/workflows/release.yml | |
parent | 3957a2555dbd81271d3e29a2f0b8f07258037e7b (diff) | |
download | alacritty-43d1afbeeb9cba0ce1281a9cf2223b5bd71664d2.tar.gz alacritty-43d1afbeeb9cba0ce1281a9cf2223b5bd71664d2.zip |
Migrate from Travis CI to GitHub Actions
This removes all CI builds from travis-ci, due to their recent changes
in policy and harsh limitations on builds. With build times over 2
hours, it was a significant hindrance to development.
Instead of Travis CI, the CI is now split on Sourcehut and GitHub. Since
Sourcehut only supports Linux/BSD, all builds on those operating systems
are executed there. The GitHub Actions CI is used to build for
Windows/macOS, which are not available on Sourcehut.
Since asset deployment for releases requires builds on all platforms,
this is also done on GitHub actions. Though the new `upload_asset.sh`
script makes sure that migration in the future is fairly simple and we
do not tie ourselves to the overly complicated GitHub Actions ecosystem.
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r-- | .github/workflows/release.yml | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..d1a9848c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,81 @@ +name: Release + +on: + push: + tags: ["v[0-9]+.[0-9]+.[0-9]+"] + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_TERM_COLOR: always + +jobs: + macos: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - name: Test + run: cargo test --release + - name: Make App + run: make dmg + - name: Upload Application + run: | + mv ./target/release/osx/Alacritty.dmg ./Alacritty-${GITHUB_REF##*/}.dmg + ./.github/workflows/upload_asset.sh ./Alacritty-${GITHUB_REF##*/}.dmg $GITHUB_TOKEN + + windows: + runs-on: windows-latest + + defaults: + run: + shell: bash + + steps: + - uses: actions/checkout@v2 + - name: Test + run: cargo test --release + - name: Build + run: cargo build --release + - name: Upload portable executable + run: | + cp ./target/release/alacritty.exe ./Alacritty-${GITHUB_REF##*/}-portable.exe + ./.github/workflows/upload_asset.sh \ + ./Alacritty-${GITHUB_REF##*/}-portable.exe $GITHUB_TOKEN + - name: Install WiX + run: nuget install WiX + - name: Crate msi installer + run: | + ./WiX.*/tools/candle.exe -nologo -arch "x64" -ext WixUIExtension -ext WixUtilExtension \ + -out "./alacritty.wixobj" "extra/windows/wix/alacritty.wxs" + ./WiX.*/tools/light.exe -nologo -ext WixUIExtension -ext WixUtilExtension \ + -out "./Alacritty-${GITHUB_REF##*/}-installer.msi" -sice:ICE61 -sice:ICE91 \ + "./alacritty.wixobj" + - name: Upload msi installer + run: | + ./.github/workflows/upload_asset.sh \ + ./Alacritty-${GITHUB_REF##*/}-installer.msi $GITHUB_TOKEN + + linux: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt-get install cmake pkg-config libfreetype6-dev libfontconfig1-dev \ + libxcb-xfixes0-dev python3 + - name: Test + run: cargo test --release + - name: Gzip manpage + run: gzip -c "./extra/alacritty.man" > "./alacritty.1.gz" + - name: Upload Assets + run: | + mv ./extra/logo/alacritty-term.svg ./Alacritty.svg + ./.github/workflows/upload_asset.sh ./Alacritty.svg $GITHUB_TOKEN + ./.github/workflows/upload_asset.sh ./alacritty.1.gz $GITHUB_TOKEN + ./.github/workflows/upload_asset.sh ./extra/completions/alacritty.bash $GITHUB_TOKEN + ./.github/workflows/upload_asset.sh ./extra/completions/alacritty.fish $GITHUB_TOKEN + ./.github/workflows/upload_asset.sh ./extra/completions/_alacritty $GITHUB_TOKEN + ./.github/workflows/upload_asset.sh ./extra/linux/Alacritty.desktop $GITHUB_TOKEN + ./.github/workflows/upload_asset.sh ./extra/alacritty.info $GITHUB_TOKEN + ./.github/workflows/upload_asset.sh ./alacritty.yml $GITHUB_TOKEN |