Skip to content

Commit 182db3c

Browse files
committed
feat(ci): re-align build and release
1 parent 0921264 commit 182db3c

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,10 @@ jobs:
8686
name: binaray package .deb
8787
needs: check
8888
runs-on: ubuntu-latest
89-
container:
90-
image: 5422m4n/rust-deb-builder:latest
9189
steps:
9290
- uses: actions/checkout@v2
93-
- name: cargo deb
94-
run: cargo deb --target=x86_64-unknown-linux-musl
91+
- name: build .deb file
92+
uses: sassman/rust-deb-builder@v1.57.0
9593
- name: Archive deb artifact
9694
uses: actions/upload-artifact@v2
9795
with:

.github/workflows/release.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,20 @@ jobs:
7979
- name: cargo test
8080
run: cargo test --all --locked -- -Z unstable-options
8181

82+
pkg-deb:
83+
name: binaray package .deb
84+
needs: check
85+
runs-on: ubuntu-latest
86+
steps:
87+
- uses: actions/checkout@v2
88+
- name: build .deb file
89+
uses: sassman/rust-deb-builder@v1.57.0
90+
- name: Archive deb artifact
91+
uses: actions/upload-artifact@v2
92+
with:
93+
name: t-rec-amd64-static.deb
94+
path: target/x86_64-unknown-linux-musl/debian/t-rec*.deb
95+
8296
audit:
8397
name: security audit
8498
needs: check
@@ -128,7 +142,6 @@ jobs:
128142
default: true
129143
profile: minimal
130144
- uses: Swatinem/rust-cache@v1
131-
- run: cargo install cargo-deb
132145
- name: Get version from tag
133146
id: tag_name
134147
run: echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
@@ -140,7 +153,6 @@ jobs:
140153
validation_depth: 10
141154
version: ${{ steps.tag_name.outputs.current_version }}
142155
path: ./CHANGELOG.md
143-
- run: cargo deb
144156
- name: Create Release
145157
# https://github.com/marketplace/actions/changelog-reader
146158
id: create_release
@@ -163,7 +175,7 @@ jobs:
163175
with:
164176
# https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
165177
upload_url: ${{ steps.create_release.outputs.upload_url }}
166-
asset_path: ./target/debian/t-rec_${{ steps.tag_name.outputs.current_version }}_amd64.deb
178+
asset_path: target/x86_64-unknown-linux-musl/debian/t-rec*.deb
167179
asset_name: t-rec_${{ steps.tag_name.outputs.current_version }}_amd64.deb
168180
asset_content_type: application/vnd.debian.binary-package
169181

0 commit comments

Comments
 (0)