Nightly release #580
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: Nightly release | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 23 * * *" | |
permissions: | |
contents: write | |
jobs: | |
publish_release: | |
name: Publish release | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Set version | |
run: | | |
echo "RUSTC_PERF_VERSION=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Checkout the source code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Install stable toolchain | |
run: | | |
rustup install $RUST_TOOLCHAIN_VERSION --profile minimal | |
rustup default $RUST_TOOLCHAIN_VERSION | |
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy | |
env: | |
RUST_TOOLCHAIN_VERSION: stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Compile frontend | |
run: | | |
cd site/frontend | |
npm ci | |
npm run build | |
- name: Compile site | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release --bin site | |
- name: Prepare archive | |
id: archive | |
run: | | |
export ARCHIVE_NAME=rustc-perf-${{ env.RUSTC_PERF_VERSION }}-linux-x64.tar.gz | |
cp target/release/site rustc-perf-site | |
tar -czvf $ARCHIVE_NAME rustc-perf-site | |
echo "ARCHIVE_NAME=${ARCHIVE_NAME}" >> $GITHUB_ENV | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
with: | |
body: Nightly release of `rustc-perf` (commit `${{ github.sha }}`, date ${{ env.RUSTC_PERF_VERSION }}) | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
name: Nightly ${{ env.RUSTC_PERF_VERSION }} | |
prerelease: true | |
tag: nightly | |
commit: ${{ github.sha }} | |
artifacts: ${{ env.ARCHIVE_NAME }} | |
removeArtifacts: true |