Attempting to fix release action #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Build Deploy | |
on: push | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
environment: Testing | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Lint | |
run: cargo clippy --verbose | |
- name: Test | |
env: | |
TAXII_USERNAME: ${{ secrets.TAXII_USERNAME }} | |
TAXII_API_KEY: ${{ secrets.TAXII_API_KEY }} | |
run: cargo test --all-features --release --lib --tests --verbose | |
build: | |
environment: Testing | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: cargo build --release --verbose | |
deploy: | |
if: startsWith(github.ref, 'refs/tags/') | |
environment: Deploy | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Deploy | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
run: cargo publish --verbose | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
name: release ${{ matrix.target }} | |
needs: deploy | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: x86_64-pc-windows-gnu | |
archive: zip | |
- target: x86_64-unknown-linux-musl | |
archive: tar.gz | |
- target: x86_64-apple-darwin | |
archive: zip | |
- target: wasm32-wasi | |
archive: zip tar.gz | |
steps: | |
- uses: actions/checkout@master | |
- name: Compile and release | |
uses: rust-build/rust-build.action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
RUSTTARGET: ${{ matrix.target }} | |
SRC_DIR: "./" | |
ARCHIVE_TYPES: ${{ matrix.archive }} | |
MINIFY: "yes" | |