Skip to content

Release

Release #145

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
- release
push:
branches:
- release
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: udoprog/github-release@channel
id: release
with:
channel: ${{github.event.inputs.channel}}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo run -p builder -- --channel ${{steps.release.outputs.channel}}
- 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/github-release@channel
id: release
with:
channel: ${{github.event.inputs.channel}}
- uses: udoprog/github-release@v1
with:
files: "dist/*"
name: ${{steps.release.outputs.channel}}
token: ${{secrets.GITHUB_TOKEN}}
prerelease: true