Skip to content

Commit fc55ec2

Browse files
authored
Merge pull request #1555 from rust-lang/ci-nightly
Prepare CI workflow for nightly releases
2 parents 39ba69e + 7aff316 commit fc55ec2

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/nightly.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Nightly release
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: "0 23 * * *"
6+
7+
jobs:
8+
publish_release:
9+
name: Publish release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Set version
13+
run: |
14+
echo "RUSTC_PERF_VERSION=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
15+
16+
- name: Checkout the source code
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 1
20+
21+
- name: Install stable toolchain
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
profile: minimal
25+
toolchain: stable
26+
override: true
27+
28+
- uses: Swatinem/rust-cache@v1
29+
30+
- name: Compile
31+
uses: actions-rs/cargo@v1
32+
with:
33+
command: build
34+
args: --release --bin site
35+
36+
- name: Prepare archive
37+
id: archive
38+
run: |
39+
export ARCHIVE_NAME=rustc-perf-${{ env.RUSTC_PERF_VERSION }}-linux-x64.tar.gz
40+
cp target/release/site rustc-perf-site
41+
tar -czvf $ARCHIVE_NAME rustc-perf-site
42+
echo "ARCHIVE_NAME=${ARCHIVE_NAME}" >> $GITHUB_ENV
43+
44+
- name: Create release
45+
uses: ncipollo/release-action@v1
46+
with:
47+
body: Nightly release of `rustc-perf` (commit `${{ github.sha }}`, date ${{ env.RUSTC_PERF_VERSION }})
48+
token: ${{ secrets.GITHUB_TOKEN }}
49+
allowUpdates: true
50+
name: Nightly ${{ env.RUSTC_PERF_VERSION }}
51+
prerelease: true
52+
tag: nightly
53+
commit: ${{ github.sha }}
54+
artifacts: ${{ env.ARCHIVE_NAME }}
55+
removeArtifacts: true

0 commit comments

Comments
 (0)