-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for publishing llvm-firtool
- Loading branch information
1 parent
dde124d
commit 220a03e
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Publish LLVM Firtool | ||
|
||
on: | ||
# TODO delete on pull_request | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'The version of firtool and llvm-firtool to publish' | ||
# TODO get rid of this default | ||
default: '1.58.0' | ||
required: true | ||
type: string | ||
snapshot: | ||
description: 'Should the version of llvm-resolver be a SNAPSHOT' | ||
default: 'true' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
publish: | ||
name: Publish LLVM Firtool | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Scala and Coursier | ||
uses: coursier/setup-action@v1 | ||
with: | ||
jvm: adopt:11 | ||
|
||
- name: Check if already published | ||
# TODO skip if snapshot | ||
run: | | ||
if cs fetch org.chipsalliance:llvm-firtool:${{ inputs.version }} ; then | ||
echo "llvm-firtool version ${{ inputs.version }} has already been published!" >> $GITHUB_STEP_SUMMARY | ||
exit 1 | ||
else | ||
exit 0 | ||
fi | ||
- name: Run Tests | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
version: ${{ inputs.version }} | ||
snapshot: ${{ inputs.snapshot }} | ||
|
||
- name: Publish | ||
shell: bash | ||
run: | | ||
./mill resolve _ | ||
# TODO do publish | ||