mirror of
https://github.com/wez/wezterm.git
synced 2024-09-19 02:37:51 +03:00
360b3f3479
refs: #2114
114 lines
3.3 KiB
YAML
114 lines
3.3 KiB
YAML
name: alpine3.13_tag
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "20*"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: "ubuntu-latest"
|
|
container: "alpine:3.13"
|
|
env:
|
|
RUSTFLAGS: "-C target-feature=-crt-static"
|
|
|
|
steps:
|
|
- name: "Upgrade system"
|
|
shell: sh
|
|
run: "apk upgrade --update-cache"
|
|
- name: "Install CI dependencies"
|
|
shell: sh
|
|
run: "apk add nodejs zstd wget bash coreutils tar findutils"
|
|
- name: "Allow root login"
|
|
shell: bash
|
|
run: "sed 's/root:!/root:*/g' -i /etc/shadow"
|
|
- name: "Install git"
|
|
shell: bash
|
|
run: "apk add git"
|
|
- name: "Install curl"
|
|
shell: bash
|
|
run: "apk add curl"
|
|
- name: "Install openssh"
|
|
shell: bash
|
|
run: "apk add openssh"
|
|
- name: "Workaround git permissions issue"
|
|
shell: bash
|
|
run: "git config --global --add safe.directory /__w/wezterm/wezterm"
|
|
- name: "checkout repo"
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: "recursive"
|
|
- name: "Install Rust"
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: "minimal"
|
|
toolchain: "stable"
|
|
override: true
|
|
components: "rustfmt"
|
|
env:
|
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
|
- name: "Cache cargo"
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: "alpine3.13-None-2-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-cargo"
|
|
- name: "Install System Deps"
|
|
shell: bash
|
|
run: "env PATH=$PATH ./get-deps"
|
|
- name: "Build (Release mode)"
|
|
shell: bash
|
|
run: "cargo build --all --release"
|
|
- name: "Test (Release mode)"
|
|
shell: bash
|
|
run: "cargo test --all --release"
|
|
- name: "Package"
|
|
shell: bash
|
|
run: "bash ci/deploy.sh"
|
|
- name: "Rename APKs"
|
|
shell: bash
|
|
run: "mv ~/packages/wezterm/x86_64/*.apk $(echo ~/packages/wezterm/x86_64/*.apk | sed -e 's/wezterm-/wezterm-alpine3.13-/')"
|
|
- name: "Move APKs"
|
|
shell: bash
|
|
run: "mv ~/packages/wezterm/x86_64/*.apk ."
|
|
- name: "Move APK keys"
|
|
shell: bash
|
|
run: "mv ~/.abuild/*.pub wezterm-alpine3.13.pub"
|
|
- name: "Upload artifact"
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: "alpine3.13"
|
|
path: |
|
|
wezterm-*.apk
|
|
*.pub
|
|
|
|
upload:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
|
|
steps:
|
|
- name: "Workaround git permissions issue"
|
|
shell: bash
|
|
run: "git config --global --add safe.directory /__w/wezterm/wezterm"
|
|
- name: "checkout repo"
|
|
uses: actions/checkout@v3
|
|
- name: "Download artifact"
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: "alpine3.13"
|
|
- name: "Checksum"
|
|
shell: bash
|
|
run: "for f in wezterm-*.apk *.pub ; do sha256sum $f > $f.sha256 ; done"
|
|
- name: "Create pre-release"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
shell: bash
|
|
run: "bash ci/retry.sh bash ci/create-release.sh $(ci/tag-name.sh)"
|
|
- name: "Upload to Tagged Release"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
shell: bash
|
|
run: "bash ci/retry.sh gh release upload --clobber $(ci/tag-name.sh) wezterm-*.apk *.pub *.sha256"
|