-
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
07eb5d3
commit cfa5b83
Showing
4 changed files
with
135 additions
and
0 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
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,21 @@ | ||
name: 'Release' | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/sw_build.yml | ||
with: | ||
gitversion-config: './.github/GitVersion-Release.yml' | ||
build_installer: true | ||
|
||
release: | ||
needs: [build] | ||
uses: ./.github/workflows/sw_tag-release.yml | ||
with: | ||
git_config_user_email: '[email protected]' | ||
git_config_user_name: ${{ github.repository_owner }} | ||
git_tag: ${{needs.build.outputs.SemVer}} | ||
changelog_builder_configuration: './.github/release-changelog-builder-configuration.json' | ||
secrets: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} |
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,84 @@ | ||
name: 'Tag & Release (Sub-Workflow)' | ||
on: | ||
workflow_call: | ||
inputs: | ||
git_config_user_email: | ||
description: 'E-mail to put in git config user.email' | ||
required: true | ||
type: string | ||
git_config_user_name: | ||
description: 'E-mail to put in git config user.email' | ||
required: true | ||
type: string | ||
git_tag: | ||
description: 'Git tag to create' | ||
required: true | ||
type: string | ||
artifact_name_in: | ||
description: 'Name of an artifact saved by a previous workflow' | ||
default: 'workflow-share' | ||
required: false | ||
type: string | ||
changelog_builder_configuration: | ||
description: 'Relative path to the configuration.json file for the mikepenz/release-changelog-builder-action' | ||
required: true | ||
type: string | ||
secrets: | ||
SSH_PRIVATE_KEY: | ||
required: true | ||
|
||
jobs: | ||
release: | ||
name: 'Create Tag and Release' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 'Download source artifact' | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ inputs.artifact_name_in }} | ||
|
||
#- name: 'Unzip artifact archive' | ||
run: | | ||
7z x ${{ inputs.artifact_name_in }}.7z -o${{ inputs.artifact_name_in }} | ||
rm -f ${{ inputs.artifact_name_in }}.7z | ||
- uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: 'Create Tag' | ||
run: | | ||
git remote set-url origin [email protected]:$REPOSITORY.git | ||
git config user.name "$USER_NAME" | ||
git config user.email "$EMAIL" | ||
git tag -a $TAG -m "$TAG" | ||
git push --follow-tags | ||
env: | ||
REPOSITORY: ${{ github.repository }} | ||
USER_NAME: ${{ inputs.git_config_user_name }} | ||
EMAIL: ${{ inputs.git_config_user_email }} | ||
TAG: ${{ inputs.git_tag }} | ||
|
||
- name: 'Build Changelog' | ||
id: build_changelog | ||
uses: mikepenz/[email protected] | ||
with: | ||
failOnError: true | ||
configuration: '${{ inputs.changelog_builder_configuration }}' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'Create Release' | ||
uses: ncipollo/[email protected] | ||
with: | ||
artifactErrorsFailBuild: true | ||
draft: false | ||
body: '${{steps.build_changelog.outputs.changelog}}' | ||
tag: '${{ inputs.git_tag }}' | ||
artifacts: '${{ inputs.artifact_name_in }}/*.exe,${{ inputs.artifact_name_in }}/Changelog_*.md,${{ inputs.artifact_name_in }}/Documentation_*.pdf' | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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