Skip to content

Commit f238954

Browse files
authored
Fix Release Pipeline (#2)
* ci: fix release workflow * ci: faster cargo-expand install * ci: flatten release archive * temp: test build run * ci: correct action syntax * ci: dev build instead of release
1 parent 6a1e86b commit f238954

File tree

2 files changed

+12
-22
lines changed

2 files changed

+12
-22
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Build and Release Service Application
2-
32
on:
43
push:
54
tags:
@@ -8,14 +7,18 @@ on:
87
jobs:
98
service-app-release:
109
runs-on: windows-latest
10+
permissions:
11+
contents: write
1112
steps:
1213
- uses: actions/checkout@v4
1314

1415
- name: Set up Rust
1516
run: rustup default stable
1617

1718
- name: Add cargo-expand
18-
run: cargo install cargo-expand
19+
uses: taiki-e/install-action@v2
20+
with:
21+
tool: cargo-expand
1922

2023
- name: Build Safe Stage
2124
run: |
@@ -29,25 +32,10 @@ jobs:
2932
working-directory: ./service-app
3033

3134
- name: Archive Publish Directory
32-
run: Compress-Archive -Path service-app/ServiceApp/bin/Release/net8.0-windows/publish -DestinationPath service-app_publish.zip
35+
run: Compress-Archive -Path service-app/ServiceApp/bin/Release/net8.0-windows/publish/* -DestinationPath service-app.zip
3336

3437
- name: Create GitHub Release
35-
id: create_release
36-
uses: actions/create-release@v1
37-
env:
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
uses: ncipollo/release-action@v1
3939
with:
40-
tag_name: ${{ github.ref_name }}
41-
release_name: Release ${{ github.ref_name }}
40+
artifacts: "service-app.zip"
4241
draft: true
43-
prerelease: false
44-
45-
- name: Upload Release Assets
46-
uses: actions/upload-release-asset@v1
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
with:
50-
upload_url: ${{ steps.create_release.outputs.upload_url }}
51-
asset_path: service-app_publish.zip
52-
asset_name: service-app_publish.zip
53-
asset_content_type: application/zip

.github/workflows/service-app.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ jobs:
2929

3030
- name: Add cargo-expand
3131
if: steps.cache-cargo.outputs.cache-hit != 'true'
32-
run: cargo install cargo-expand
32+
uses: taiki-e/install-action@v2
33+
with:
34+
tool: cargo-expand
3335

3436
- name: Build Safe Stage
3537
run: |
3638
cargo run -p bindings
37-
cargo build --release -F ffi
39+
cargo build -F ffi
3840
working-directory: ./safe-stage
3941

4042
- name: Build Service Application

0 commit comments

Comments
 (0)