-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dominik/tag-and-merge' into dominik/tag-and-merge-test-…
…base-branch
- Loading branch information
Showing
11 changed files
with
238 additions
and
36 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,51 @@ | ||
name: Tag Repository and Create GitHub Release | ||
description: Tags the repository and creates a GitHub release | ||
inputs: | ||
prerelease: | ||
description: "Whether the release is a prerelease" | ||
required: false | ||
type: boolean | ||
default: true | ||
GH_TOKEN: | ||
description: "GitHub token" | ||
required: true | ||
type: string | ||
outputs: | ||
tag: | ||
description: "Tag that has been added" | ||
value: ${{ steps.compute-tag.outputs.tag }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
git config --global user.name "Dax the Duck" | ||
git config --global user.email "[email protected]" | ||
shell: bash | ||
- id: compute-tag | ||
run: | | ||
version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" | ||
if [[ "${{ inputs.prerelease }}" == "true" ]]; then | ||
build_number="$(cut -d ' ' -f 3 < Configuration/BuildNumber.xcconfig)" | ||
tag="${version}-${build_number}" | ||
else | ||
tag="${version}" | ||
fi | ||
echo "tag=${tag}" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- id: tag-repo | ||
run: | | ||
git tag ${{ steps.compute-tag.outputs.tag }} | ||
git push origin ${{ steps.compute-tag.outputs.tag }} | ||
shell: bash | ||
|
||
- id: create-github-release | ||
run: | | ||
latest_release="$(gh api /repos/${{ github.repository }}/releases/latest --jq '.tag_name')" | ||
if [[ "${{ inputs.prerelease }}" == "true" ]]; then | ||
gh release create ${{ steps.compute-tag.outcome.tag }} --generate-notes --prerelease --notes-start-tag ${latest_release} | ||
else | ||
gh release create ${{ steps.compute-tag.outcome.tag }} --generate-notes --notes-start-tag ${latest_release} | ||
fi | ||
shell: bash |
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 |
---|---|---|
|
@@ -70,23 +70,11 @@ jobs: | |
access-token: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
task-id: ${{ steps.get-task-id.outputs.task-id }} | ||
|
||
- name: Set up git | ||
run: | | ||
git config --global user.name "Dax the Duck" | ||
git config --global user.email "[email protected]" | ||
- name: Construct a tag | ||
id: construct-tag | ||
run: | | ||
version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" | ||
build_number="$(cut -d ' ' -f 3 < Configuration/BuildNumber.xcconfig)" | ||
tag="${version}-${build_number}" | ||
echo "tag=${tag}" >> $GITHUB_OUTPUT | ||
- name: Tag the repo | ||
run: | | ||
git tag ${{ steps.construct-tag.outputs.tag }} | ||
git push origin ${{ steps.construct-tag.outputs.tag }} | ||
- name: Create Tag and GitHub Release | ||
uses: ./.github/actions/create-tag-and-github-release | ||
with: | ||
prerelease: true | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
- name: Merge to base branch | ||
id: merge | ||
|
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
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
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
Oops, something went wrong.