temp #25
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: Build and Release | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
# tags: | ||
# - v* | ||
jobs: | ||
# tests: | ||
# runs-on: ${{ matrix.os }} | ||
# strategy: | ||
# matrix: | ||
# os: [ubuntu-latest, macOS-latest, windows-latest] | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Cache tests | ||
# id: test-cache | ||
# uses: actions/cache@v4 | ||
# with: | ||
# path: target | ||
# key: ${{ matrix.os }}-test-cache | ||
# - name: Run tests | ||
# run: cargo test | ||
build: | ||
needs: [create_release] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest] #, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache build | ||
id: build-cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: target | ||
key: ${{ matrix.os }}-build-cache | ||
- name: Build | ||
run: cargo build --release | ||
- name: Upload Release Asset | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
mv target/release/jaslog target/release/jaslog_$(uname) | ||
ls target/release/ | ||
create_release: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
name: Release ${{ github.ref }} | ||
artifacts: "target/release/jaslog_Linux target/release/jaslog_macos target/release/jaslog.exe" |