Skip to content

Release

Release #315

Workflow file for this run

name: Release
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
channel:
description: 'release to perform'
required: true
default: 'nightly'
type: choice
options:
- nightly
- "%date"
push:
branches:
- release
env:
KICK_VERSION: "${{github.event.inputs.version}} || nightly"
RUST_LOG: kick=trace
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace --exclude no-std-examples --all-targets
- run: cargo test --workspace --doc
- run: cargo run --bin rune -- check --recursive --experimental scripts
- run: cargo run --bin rune -- test --recursive --experimental scripts
build:
needs: test
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: udoprog/kick@nightly
- run: kick define --github-action
id: release
- run: cargo build --release
- run: cargo run -p builder -- --channel ${{steps.release.outputs.version}}
- uses: actions/upload-artifact@v1
with:
name: dist-${{matrix.os}}
path: dist
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: echo "HEAD_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
- run: 'echo "HEAD_SHA: $HEAD_SHA"'
- uses: actions/setup-node@v3
with:
node-version: 16
- run: 'echo "TAG: ${{needs.tag.outputs.tag}}"'
- uses: actions/download-artifact@v1
with: {name: dist-macos-latest, path: dist}
- uses: actions/download-artifact@v1
with: {name: dist-windows-latest, path: dist}
- uses: actions/download-artifact@v1
with: {name: dist-ubuntu-latest, path: dist}
- uses: udoprog/kick@nightly
- run: kick github-release --upload "dist/*" --github-action
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}