Skip to content

Commit

Permalink
add publish step
Browse files Browse the repository at this point in the history
  • Loading branch information
rohdealx committed Mar 1, 2024
1 parent 30aa917 commit 9da3424
Showing 1 changed file with 29 additions and 10 deletions.
39 changes: 29 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@ env:
SCCACHE_VERSION: 0.7.7
SCCACHE_CACHE_KEY: v1

# TODO caching (rust files, sccache)
# TODO ensure config scheme is up to date
# TODO improve code coverage handling
# TODO handle release for tag
# TODO - check version: tag vs cargo toml
# TODO - download artifacts
# TODO - get changelog
# TODO - create release
# TODO https://github.com/obi1kenobi/cargo-semver-checks-action
# TODO semantic commits for changelog and version
# TODO if it's a tag build disable sccache

jobs:
lint:
Expand Down Expand Up @@ -119,7 +115,7 @@ jobs:
env:
RUSTFLAGS: -C instrument-coverage
RUSTC_WRAPPER: sccache
- run: sccache --show-stats
- run: sccache --show-stats && sccache -z
- name: Test
run: cargo test --target ${{ matrix.target }}
env:
Expand All @@ -138,16 +134,39 @@ jobs:
run: cargo clippy --all-targets -- -D warnings
env:
RUSTC_WRAPPER: sccache
- run: sccache --show-stats
- run: sccache --show-stats && sccache -z
if: ${{ matrix.component == 'clippy' }}

- name: Build release
run: cargo build --release --target ${{ matrix.target }}
env:
RUSTFLAGS: ${{ matrix.rustflags }}
RUSTC_WRAPPER: sccache
- run: sccache --show-stats
- run: sccache --show-stats && sccache -z
- name: Upload
uses: actions/upload-artifact@v4
with:
name: havocompare-${{ matrix.target }}
path: target/${{ matrix.target }}/release/havocompare${{ startsWith(matrix.os, 'windows') && '.exe' || '' }}
if-no-files-found: error

publish:
name: publish
runs-on: ubuntu-22.04
needs: main
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: Cargo.toml
- name: Download
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: havocompare-*
- run: ls -larth
- run: ls -larth artifacts
- name: Create release
run: |
# TODO - check version: tag vs cargo toml
gh --version
# if: ${{ startsWith(github.ref, 'refs/tags/') }}

0 comments on commit 9da3424

Please sign in to comment.