-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update releases when release branches change (#26)
This change enables automatic PDF generation for releases when release branches are changed. This supports "backporting" changes to prior releases. This works by: - Creating a branch named 'release/XYZ', where XYZ is the name of a release, when a release is made. - Activating PDF generation when 'release/XYZ' branches are changed. - Updating the release XYZ when PDF generation is finished. The release may be named anything. The only portion of the name that is important for these actions is 'release/' in the branch name.
- Loading branch information
1 parent
c2d9f47
commit 9e51128
Showing
4 changed files
with
62 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Creates or updates a release's generated PDF when a change occurs | ||
# to a release branch | ||
name: Update Existing Release | ||
on: | ||
push: | ||
branches: | ||
- "release/*" | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Git repository | ||
uses: actions/checkout@v2 | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "RELEASE_NAME=$(echo ${GITHUB_REF#refs/heads/release/})" >> $GITHUB_ENV | ||
- name: Compile document | ||
uses: xu-cheng/latex-action@v2 | ||
with: | ||
root_file: ifc.tex | ||
working_directory: ltx | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: ${{env.RELEASE_NAME}} | ||
prerelease: false | ||
title: ${{env.RELEASE_NAME}} | ||
files: ltx/ifc.pdf |
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Creates a release branch whenever a release is created. | ||
|
||
name: Create Release Branch | ||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
create_branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: peterjgrainger/action-create-branch@v2.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
branch: 'release/${{ github.event.release.tag_name }}' |
7 changes: 5 additions & 2 deletions
7
.github/workflows/produce-release.yml → .github/workflows/produce-release-pdf.yml
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