-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e91d75
commit 4e7825d
Showing
2 changed files
with
76 additions
and
109 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 |
---|---|---|
@@ -1,6 +1,14 @@ | ||
name: Generate PDF | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
|
@@ -35,3 +43,70 @@ jobs: | |
name: 16-9 | ||
path: /tmp/169/*.pdf | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: ${{ (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master' && github.event_name == 'push') }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Download 4:3 | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: 4-3 | ||
path: 43/ | ||
|
||
- name: Download 16:9 | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: 16-9 | ||
path: 169/ | ||
|
||
- name: Zip | ||
run: | | ||
zip -r 4-3.zip 43/ | ||
zip -r 16-9.zip 169/ | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
custom_tag: auto-release-${{ github.sha }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: auto-release-${{ github.sha }} | ||
release_name: Auto Release ${{ github.sha }} | ||
body: | | ||
Automatically created by GitHub Actions | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Release 4:3 | ||
id: upload-release-asset-4-3 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./4-3.zip | ||
asset_name: 4-3.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Release 16:9 | ||
id: upload-release-asset-16-9 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./16-9.zip | ||
asset_name: 16-9.zip | ||
asset_content_type: application/zip | ||
|
This file was deleted.
Oops, something went wrong.