-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (69 loc) · 2.22 KB
/
Copy pathrelease.yml
File metadata and controls
75 lines (69 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Release
# Triggered when a tag like `v0.1.0` is pushed. Builds release
# binaries for Linux + Windows x86_64 and attaches them to a GitHub
# Release. macOS is not supported in this pass.
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"
jobs:
build-linux:
name: build (linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup show active-toolchain || rustup toolchain install
- name: Install FUSE
run: sudo apt-get update && sudo apt-get install -y fuse3 libfuse3-dev pkg-config
- uses: Swatinem/rust-cache@v2
- name: Build devdev (release)
run: cargo build --release -p devdev-cli --bin devdev
- name: Package
run: |
mkdir -p dist
tar -C target/release -czf dist/devdev-${GITHUB_REF_NAME}-x86_64-unknown-linux-gnu.tar.gz devdev
- uses: actions/upload-artifact@v4
with:
name: devdev-linux
path: dist/*
build-windows:
name: build (windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: rustup show active-toolchain || rustup toolchain install
- uses: Swatinem/rust-cache@v2
- name: Build devdev (release)
shell: pwsh
run: cargo build --release -p devdev-cli --bin devdev
- name: Package
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path dist | Out-Null
Compress-Archive -Path target\release\devdev.exe -DestinationPath "dist\devdev-${env:GITHUB_REF_NAME}-x86_64-pc-windows-msvc.zip"
- uses: actions/upload-artifact@v4
with:
name: devdev-windows
path: dist/*
release:
name: publish release
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/*
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}