Skip to content

Commit

Permalink
Combine yml files
Browse files Browse the repository at this point in the history
  • Loading branch information
lxylxy123456 committed Dec 12, 2020
1 parent 1e91d75 commit 4e7825d
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 109 deletions.
77 changes: 76 additions & 1 deletion .github/workflows/build.yml
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:
Expand Down Expand Up @@ -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

108 changes: 0 additions & 108 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit 4e7825d

Please sign in to comment.