-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Correct the build process to push release notes through for the …
…public website
- Loading branch information
Showing
4 changed files
with
23 additions
and
5 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 |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
push: | ||
branches: '**' | ||
release: | ||
types: [published] | ||
types: [created] | ||
schedule: | ||
# Daily 5am australian/brisbane time (7pm UTC) | ||
- cron: '0 19 * * *' | ||
|
@@ -14,6 +14,8 @@ jobs: | |
build: | ||
name: Build and unit test code | ||
runs-on: windows-latest | ||
# conditionally skip build on PR merge of release-please, because the release creation is going to trigger the real build | ||
if: ${{ github.ref_name != github.event.repository.default_branch || github.event.head_commit.author.username != 'team-integrations-fnm-bot' }} | ||
outputs: | ||
version: ${{ steps.nuke-build.outputs.version }} | ||
steps: | ||
|
@@ -245,12 +247,22 @@ jobs: | |
artifacts/OctopusTools.Packages.linux-x64.${{ needs.build.outputs.version }}.zip | ||
artifacts/OctopusTools.Zips.${{ needs.build.outputs.version }}.zip | ||
- name: Fetch Release Notes | ||
id: fetch-release-notes | ||
if: github.event_name == 'release' | ||
run: | | ||
echo "::debug::${{github.event_name}}" | ||
OUTPUT_FILE="release_notes.txt" | ||
jq --raw-output '.release.body' ${{ github.event_path }} | sed 's#\r# #g' > $OUTPUT_FILE | ||
echo "::set-output name=release-note-file::$OUTPUT_FILE" | ||
- name: Create a release in Octopus Deploy 🐙 | ||
uses: OctopusDeploy/[email protected] | ||
with: | ||
space: Integrations | ||
project: 'Octopus CLI' | ||
package_version: ${{ needs.build.outputs.version }} | ||
packages: '*:NuGet.CommandLine:4.4.1' | ||
git_ref: ${{ (github.ref_type == 'tag' && 'main' ) || (github.head_ref || github.ref) }} | ||
release_notes_file: ${{ (github.event_name == 'release' && steps.fetch-release-notes.outputs.release-note-file) || ''}} | ||
git_ref: ${{ (github.ref_type == 'tag' && github.event.repository.default_branch ) || (github.head_ref || github.ref) }} | ||
git_commit: ${{ github.event.after || github.event.pull_request.head.sha }} |
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
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 +1 @@ | ||
version = 4 | ||
version = 5 |