Skip to content

release action 3

release action 3 #11

Workflow file for this run

name: Release
on:
push:
tags: ["v*.*.*"]
env:
CARGO_TERM_COLOR: always
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Run tests
run: cargo test --verbose
- name: Build
run: cargo build --verbose --release
- name: copy build artifact to zip file
shell: powershell
working-directory: ${{ github.workspace }}
run: |
cp .\target\release\timeline.dll .\timeline\timeline.dll
Compress-Archive .\timeline\ timeline-win-x86_64.zip -u
- name: Upload Archive
uses: actions/upload-artifact@v3
with:
name: timeline-win-x86_64
path: timeline-win-x86_64.zip
compression-level: 0
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Run tests
run: cargo test --verbose
- name: Build
run: cargo build --verbose --release
- name: copy build artifact to zip file
working-directory: ${{ github.workspace }}
run: |
cp ./target/release/libtimeline.dylib ./timeline/libtimeline.dylib
zip -r timeline-macos-x86_64.zip ./timeline
- name: Upload Archive
uses: actions/upload-artifact@v3
with:
name: timeline-macos-x86_64
path: timeline-macos-x86_64.zip
compression-level: 0
do-release:
runs-on: ubuntu-latest
needs: [build-windows, build-macos]
permissions:
contents: write
steps:
- name: Download Windows Build
uses: actions/download-artifact@v3
with:
name: timeline-win-x86_64
path: timeline-win-x86_64.zip
- name: Download MacOS Build
uses: actions/download-artifact@v3
with:
name: timeline-macos-x86_64
path: timeline-macos-x86_64.zip
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: "*.zip"