Skip to content

Commit

Permalink
ci: allow overriding release tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Desdaemon committed Aug 24, 2023
1 parent 441feb3 commit 223053e
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: nightly

on:
workflow_dispatch:
inputs:
release_name:
type: string
description: Defaults to `nightly-YYYYMMDD`
schedule:
- cron: "0 5 * * *"

Expand Down Expand Up @@ -41,6 +45,7 @@ jobs:
if: needs.check.outputs.skip != 'true'

strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-latest
Expand Down Expand Up @@ -68,6 +73,18 @@ jobs:
toolchain: stable
target: ${{ matrix.target }}

- name: Additional setup for musl
if: contains(matrix.target, 'musl')
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
- name: Additional setup for Linux x86
if: matrix.target == 'i686-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-multilib
- name: Build
run: cargo build --release --target ${{ matrix.target }}

Expand Down Expand Up @@ -130,7 +147,7 @@ jobs:
openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256";
done
- name: Get current date
run: echo "TAG=nightly-$(date +'%Y%m%d')" >> "$GITHUB_ENV"
run: echo "TAG=${{ inputs.release_name || 'nightly-$(date +"%Y%m%d")' }}" >> "$GITHUB_ENV"
- name: Create tag
run: git tag -f ${{ env.TAG }} && git push --tags
- name: Release
Expand Down

0 comments on commit 223053e

Please sign in to comment.