Update CD permissions for uploading release artifacts (#4529) #16
Workflow file for this run
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: Generate Chisel Scala CLI Example | ||
on: | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
jobs: | ||
generate_scala_cli_example: | ||
name: Generate Scala CLI Example | ||
<<<<<<< HEAD | ||
runs-on: ubuntu-latest | ||
======= | ||
uses: ./.github/workflows/build-scala-cli-example.yml | ||
publish_example: | ||
name: Generate Chisel Scala CLI Example | ||
needs: [generate_scala_cli_example] | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
>>>>>>> 25d00af83 (Update CD permissions for uploading release artifacts (#4529)) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
# Need to fetch full history for deriving version | ||
with: | ||
fetch-depth: 0 | ||
- name: Build and Test Scala-CLI Example | ||
uses: ./.github/workflows/build-scala-cli-example | ||
- name: Upload Example | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: chisel-example.scala | ||
path: chisel-example.scala | ||
retention-days: 7 | ||
- name: Upload To Release Page | ||
if: github.event_name == 'release' | ||
uses: softprops/action-gh-release@v2.1.0 | ||
with: | ||
files: chisel-example.scala | ||