diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 053c26e..f01106b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,45 +4,25 @@ on: push: branches: - main - pull_request: - branches: - - main jobs: - compile_latex: + build_and_release: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y%m%d')" + - name: Compile LaTeX uses: hspaans/latexmk-action@v1 with: format: pdf filename: root.tex - - name: Upload compiled PDF as artifact - uses: actions/upload-artifact@v2 - with: - name: compiled-pdf - path: root.pdf - - create_release: - needs: compile_latex - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - name: Download compiled PDF artifact - uses: actions/download-artifact@v2 - with: - name: compiled-pdf - - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y%m%d')" - - name: Create Release id: create_release uses: actions/create-release@v1 @@ -50,18 +30,17 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ steps.date.outputs.date }}-${{ github.run_number }} - release_name: - Release ${{ steps.date.outputs.date }}-${{ github.run_number }} + release_name: Release ${{ steps.date.outputs.date }}-${{ github.run_number }} draft: false prerelease: false - name: Upload Release Asset - id: 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: root.pdf + asset_path: ./root.pdf asset_name: robot-writeup-2024.pdf asset_content_type: application/pdf