-
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.
Merge pull request #13 from mobilecoinofficial/cache-artifacts
Wrapers and cache
- Loading branch information
Showing
5 changed files
with
150 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,67 @@ | ||
name: GH Release | ||
description: Wrapper for softprops/action-gh-release | ||
|
||
inputs: | ||
body: | ||
description: "Note-worthy description of changes in release" | ||
required: false | ||
body_path: | ||
description: "Path to load note-worthy description of changes in release from" | ||
required: false | ||
name: | ||
description: "Gives the release a custom name. Defaults to tag name" | ||
required: false | ||
tag_name: | ||
description: "Gives a tag name. Defaults to github.GITHUB_REF" | ||
required: false | ||
draft: | ||
description: "Creates a draft release. Defaults to false" | ||
required: false | ||
prerelease: | ||
description: "Identify the release as a prerelease. Defaults to false" | ||
required: false | ||
files: | ||
description: "Newline-delimited list of path globs for asset files to upload" | ||
required: false | ||
fail_on_unmatched_files: | ||
description: "Fails if any of the `files` globs match nothing. Defaults to false" | ||
required: false | ||
repository: | ||
description: "Repository to make releases against, in <owner>/<repo> format" | ||
required: false | ||
token: | ||
description: "Authorized secret GitHub Personal Access Token. Defaults to github.token" | ||
required: false | ||
default: ${{ github.token }} | ||
target_commitish: | ||
description: "Commitish value that determines where the Git tag is created from. Can be any branch or commit SHA." | ||
required: false | ||
discussion_category_name: | ||
description: "If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored." | ||
required: false | ||
generate_release_notes: | ||
description: "Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes." | ||
required: false | ||
append_body: | ||
description: "Append to existing body instead of overwriting it. Default is false." | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body: ${{ inputs.body }} | ||
body_path: ${{ inputs.body_path }} | ||
name: ${{ inputs.name }} | ||
tag_name: ${{ inputs.tag_name }} | ||
prerelease: ${{ inputs.prerelease }} | ||
files: ${{ inputs.files }} | ||
fail_on_unmatched_files: ${{ inputs.fail_on_unmatched_files }} | ||
repository: ${{ inputs.repository }} | ||
token: ${{ inputs.token }} | ||
target_commitish: ${{ inputs.target_commitish }} | ||
discussion_category_name: ${{ inputs.discussion_category_name }} | ||
generate_release_notes: ${{ inputs.generate_release_notes }} | ||
append_body: ${{ inputs.append_body }} |
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,29 @@ | ||
name: Publish to Buf | ||
description: Wrapper for publishing protos to buf.build | ||
|
||
inputs: | ||
github_token: | ||
description: Github token passed into setup to prevent api rate limiting | ||
required: true | ||
buf_token: | ||
description: buf.build api token | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout | ||
uses: mobilecoinofficial/gh-actions/checkout@v0 | ||
|
||
- name: Buf Setup | ||
uses: bufbuild/[email protected] | ||
with: | ||
github_token: ${{ inputs.github_token }} | ||
|
||
- name: Publish Protobufs to Buf | ||
uses: bufbuild/buf-push-action@v1 | ||
with: | ||
# TODO: Reuse GH tag on buf when buf-push-action supports specifying | ||
# it: https://github.com/bufbuild/buf-push-action/issues/20 | ||
input: api/proto | ||
buf_token: ${{ inputs.buf_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Bump Tag | ||
description: Wrapper for anothrNick/github-tag-action | ||
|
||
inputs: | ||
github_token: | ||
description: Github token passed into setup to prevent api rate limiting | ||
required: true | ||
with_v: | ||
description: prepend 'v' to tag version | ||
default: 'true' | ||
default_bump: | ||
description: bump major, minor or patch by default | ||
default: patch | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout | ||
uses: mobilecoinofficial/gh-actions/checkout@v0 | ||
with: | ||
token: ${{ inputs.github_token }} | ||
|
||
- name: Bump GitHub tag | ||
uses: anothrNick/github-tag-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github_token }} | ||
WITH_V: ${{ inputs.with_v }} | ||
DEFAULT_BUMP: ${{ inputs.default_bump }} |
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,22 @@ | ||
name: Upload Artifacts | ||
description: Wrapper for actions/upload-artifact | ||
|
||
inputs: | ||
name: | ||
description: Artifact name | ||
required: true | ||
path: | ||
description: A file, directory or wildcard pattern that describes what to upload | ||
required: true | ||
retention-days: | ||
description: Duration after which artifact will expire in days. 0 means using default retention. | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Upload binaries | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.name }} | ||
path: ${{ inputs.path }} | ||
retention-days: ${{ inputs.retention-days }} |