New neovide release #12
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: New neovide release | |
# Controls when the workflow will run | |
on: | |
push: | |
paths: | |
- 'release-version/*' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Get the download link for neovide. | |
- name: Fetch release version | |
run: | | |
echo "latest_tag=$(\ | |
curl -sL https://api.github.com/repos/neovide/neovide/releases/latest | \ | |
jq -r ".tag_name")" \ | |
>> $GITHUB_ENV\ | |
# Use the github checkout action to pull in the latest neovide tag. | |
- uses: actions/checkout@v3 | |
with: | |
repository: neovide/neovide | |
submodules: true | |
ref: ${{ env.latest_tag }} | |
# Find the version of skia-safe (and skia-bindings + skia-binaries) within Cargo.toml. | |
- name: Find skia version | |
run: | | |
echo "skia_tag=$(\ | |
sed -rn "/^\[target\.'cfg\(linux\)'.*skia-safe\]/,+2s/^version = \"(.*)\"/\1/p" Cargo.toml)" \ | |
>> $GITHUB_ENV | |
# Make sure that the tag version of skia-binaries is available | |
- name: Find skia download link | |
run: | | |
echo "skia_download=$(\ | |
curl -sL https://api.github.com/repos/rust-skia/skia-binaries/releases/tags/${{ env.skia_tag }} | \ | |
jq -r '.assets[] | .name | scan(".*linux-gnu-egl-gl-svg-textlayout-wayland-x11.tar.gz")')" \ | |
>> $GITHUB_ENV | |
# Use the previous two steps to download skia-binaries | |
- name: Download skia binaries | |
run: | | |
curl -Lo skia-binaries-${{ env.skia_tag }}.tar.gz \ | |
https://github.com/rust-skia/skia-binaries/releases/download/${{ env.skia_tag }}/${{ env.skia_download }} | |
- name: Create neovide tarball | |
run: | | |
cd .. | |
zip neovide-${{ env.latest_tag }}-complete.zip ${{ github.event.repository.name }} -r | |
tar -czvf neovide-${{ env.latest_tag }}-complete.tar.gz ${{ github.event.repository.name }} | |
- name: Run cargo vendor | |
run: | | |
echo "These are in the current directory:" | |
#cd ${{ github.event.repository.name }} | |
cargo vendor | |
- name: Get skia source and depot_tools | |
run: | | |
sed -rn "/^\[package\.metadata\]/,+2s/(skia|depot_tools) = \"(.*)\"/\1=\2/p" \ | |
vendor/skia-bindings/Cargo.toml >> $GITHUB_ENV | |
- name: Fetch skia and depot_tools | |
run: | | |
cd vendor/skia-bindings | |
echo "Downloading Skia" | |
curl -L https://codeload.github.com/rust-skia/skia/tar.gz/${{ env.skia }} | \ | |
tar -xz --transform 's!^[^/]*!skia!' | |
echo "Downloading depot_tools" | |
curl -L https://codeload.github.com/rust-skia/depot_tools/tar.gz/${{ env.depot_tools }} \ | |
| tar -xz --transform 's!^[^/]*!depot_tools!' | |
- name: Create vendor tarball | |
run: | | |
cd .. | |
tar -czvf vendor.tar.gz ${{ github.event.repository.name }}/vendor | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: neovide-${{ env.latest_tag }}-vendored | |
prerelease: true | |
files: | | |
../neovide-${{ env.latest_tag }}-complete.zip | |
../neovide-${{ env.latest_tag }}-complete.tar.gz | |
../vendor.tar.gz |