Skip to content

Commit

Permalink
upload archive only with stacks binary when tag is created
Browse files Browse the repository at this point in the history
  • Loading branch information
dshulyak committed Sep 5, 2024
1 parent 1a48235 commit 7bb1edf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 30 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
target: [
Expand All @@ -25,12 +25,7 @@ jobs:
with:
target: ${{ matrix.target }}
- run: CLANG=clang-15 cargo install --path=stacks --root=. --target ${{ matrix.target }}
- run: cargo install --path=stacksexport --root=. --target ${{ matrix.target }}
- uses: actions/upload-artifact@v4
with:
name: stacks-${{ matrix.target }}
path: bin/stacks
- uses: actions/upload-artifact@v4
with:
name: stacksexport-${{ matrix.target }}
path: bin/stacksexport
38 changes: 15 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
uses: ./.github/workflows/build.yml
secrets: inherit
release:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [build, test]
steps:
-
name: Download the artifacts
name: download artifacts
uses: actions/download-artifact@v4
-
name: Create Release
name: create Release
uses: actions/create-release@v1
id: create_release
env:
Expand All @@ -34,24 +34,16 @@ jobs:
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: true
-
name: upload stacks x86_64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: stacks-x86_64-unknown-linux-gnu/stacks
asset_name: stacks-x86_64-unknown-linux-gnu
asset_content_type: application/octet-stream
-
name: upload stacksexport x86_64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: stacks-x86_64-unknown-linux-gnu/stacksexport
asset_name: stacks-x86_64-unknown-linux-gnu
asset_content_type: application/octet-stream
- name: archive binary
run: tar -czvf stacks-x86_64-unknown-linux-gnu.tar.gz stacks-x86_64-unknown-linux-gnu/stacks

- name: upload stacks binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./stacks-x86_64-unknown-linux-gnu.tar.gz
asset_name: stacks-x86_64-unknown-linux-gnu.tar.gz
asset_content_type: application/gzip

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ members = ["e2e", "stacks", "stacksexport", "tracing-stacks"]
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
codegen-units = 16

[profile.release-debug]
inherits = "release"
debug = 1

0 comments on commit 7bb1edf

Please sign in to comment.