From 662d8fccb5f7ca45ffb47ed764f0c275cb141195 Mon Sep 17 00:00:00 2001 From: Ana Pazos Date: Thu, 26 Dec 2024 14:35:42 -0800 Subject: [PATCH] testing my wf --- .github/workflows/build-pdf.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-pdf.yml b/.github/workflows/build-pdf.yml index 309fd24..498b88b 100644 --- a/.github/workflows/build-pdf.yml +++ b/.github/workflows/build-pdf.yml @@ -24,11 +24,11 @@ on: description: Create release as a draft? required: false type: boolean - default: false + default: true pull_request: push: branches: - - main + - mywf jobs: build: @@ -72,15 +72,26 @@ jobs: retention-days: 30 # Create Release - - name: Create Release + - name: Create Draft Release uses: softprops/action-gh-release@v1 with: files: ${{ github.workspace }}/build/*.pdf - tag_name: v${{ steps.version.outputs.version }} - name: Release ${{ steps.version.outputs.version }} + tag_name: draft-${{ steps.date.outputs.date }}-${{ github.sha }} + name: Draft release ${{ steps.date.outputs.date }} + body: Latest snapshot (${{ github.sha }}) draft: ${{ github.event.inputs.draft }} prerelease: ${{ github.event.inputs.prerelease }} env: GITHUB_TOKEN: ${{ secrets.GHTOKEN }} - if: github.event_name == 'workflow_dispatch' - # This condition ensures this step only runs for workflow_dispatch events. + + # Upload Release Asset + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./riscv-asm + asset_name: riscv-asm + asset_content_type: application/pdf