Skip to content

Update upload asset to release: remove deprecated action (#685) #323

Update upload asset to release: remove deprecated action (#685)

Update upload asset to release: remove deprecated action (#685) #323

name: Build Userguide pdf
on:
push:
branches:
- main
- develop
- doc
- test
release:
types: [ created ]
env:
GITHUB_TOKEN: ${{ github.token }}
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v3
- name: Get release
if: github.event_name == 'release' && github.event.action == 'created'
id: get_release
uses: bruceadams/get-release@main
- name: Read antares-xpansion version
id: antares-xpansion-version
uses: ./.github/actions/read-json-value
with:
path: 'antares-version.json'
key: 'antares_xpansion_version'
- id: create-user-guide
name: user guide pdf creation
uses: ./.github/workflows/generate-userguide-pdf
with:
antares-xpansion-version: ${{steps.antares-xpansion-version.outputs.result}}
- name: upload user guide
uses: actions/upload-artifact@v3
with:
name: ${{ steps.create-user-guide.outputs.pdf-name }}
path: ${{ steps.create-user-guide.outputs.pdf-path }}
- name: publish guide upload
if: github.event_name == 'release' && github.event.action == 'created'
uses: actions/[email protected]
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ${{ steps.create-user-guide.outputs.pdf-path }}
asset_name: ${{ steps.create-user-guide.outputs.pdf-name }}
asset_content_type: application/pdf