-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made release instructions clearer and change the "release" tag to happen after the release PR has been merged to `main`. This (along with the following) ensures that this PR isn't included in the release notes of the next *framework* release. Added a workflow to publish a release on tags of the form `x.y.z` (i.e. for release of the Swift package). This means that we'll have releases both when we publish framework and package (the former now has "(framework)" appended to its release name). This workflow cannot be tested before it's been merged to `main`, but a `workflow_dispatch` trigger has been added in case we need to debug. The old releases have already been updated to conform to the changes in this PR. The indentation in the workflow files has been adjusted for consistency. In the "Publish Binary Framework" workflow the `zip` command was replaced with `ditto` as that is recommended in various places because it's the command that Finder uses to compress. It apparently also includes things that `zip` doesn't which could be relevant if the contents were to be signed at some point... Finally, the generated swift file was also renamed to `generated.swift` to prevent it from confusing reviewers to think that it's manual work 🙈
- Loading branch information
Showing
7 changed files
with
147 additions
and
83 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
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,42 @@ | ||
name: Publish release for SwiftPM package tag | ||
|
||
on: | ||
push: | ||
tags: "*.*.*" | ||
workflow_dispatch: # trigger manually (for debugging) | ||
|
||
jobs: | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: '${{github.ref}}' | ||
- name: Extract version of the crate | ||
uses: bisgardo/github-action-echo@v1 | ||
id: crate-version | ||
with: | ||
version: | | ||
$(cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "concordium-wallet-crypto-uniffi") | .version') | ||
- name: Fail if tag doesn't match crate version | ||
if: "steps.crate-version.version != github.ref" | ||
run: exit 1 | ||
- name: Extract tag message | ||
uses: bisgardo/github-action-echo@v1 | ||
id: tag-msg | ||
with: | ||
msg: '$(git for-each-ref "${{github.ref}}" --format="%(contents)")' | ||
- name: Fail if tag is not "annotated" or its message is empty | ||
if: "steps.tag-msg.outputs.msg == ''" | ||
run: exit 1 | ||
- name: Upload package as GitHub release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: '${{github.ref}}' | ||
name: '${{github.ref}}' | ||
# Release body is the message of the annotated tag. | ||
body: | | ||
${{steps.tag-msg.outputs.msg}} | ||
generate_release_notes: false |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# The generated swift file is ignored by default to prevent committing it untimely. | ||
# Use 'git add -f ./Sources' to bypass this protection when releasing. | ||
generated.swift |
File renamed without changes.