Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Workflow Fixes #1565

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
TAG: ${{ inputs.release }}

steps:
- name: Setup release ${{ inputs.release }}
run: |
echo "Creating release ${{ inputs.release }} from previous tag ${{ inputs.tags }} with ref ${{ inputs.git-ref }}"
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git-ref }}
Expand Down Expand Up @@ -57,13 +60,19 @@ jobs:

- name: Draft release
id: draft_release
# TODO: This action is no longer mainained. We should use a different action
# or the gh command line directly.
Comment on lines +63 to +64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you open an issue instead or in addition?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: #1567

uses: actions/create-release@v1
with:
release_name: "Shipwright Build release ${{ inputs.release }}"
tag_name: ${{ inputs.release }}
body_path: Changes.md
draft: true
prerelease: true
# create-release assumes one of two things if commitish is not set
# 1. Release is from the "latest commit" on the repo's default branch.
# 2. Release is for an existing tag with the same name
commitish: ${{ inputs.git-ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -78,9 +87,13 @@ jobs:
gh release upload ${TAG} sample-strategies.yaml

- name: Sign released images
# Updated to use the git SHA of the checked out commit. The SHA for
# workflow_dispatch events is the latest SHA of the _branch_ where the
# action was invoked.
run: |
gitsha=$(git rev-parse --verify HEAD)
grep -o "ghcr.io[^\"]*" release.yaml | xargs cosign sign --yes \
-a sha=${{ github.sha }} \
-a sha=${gitsha} \
-a run_id=${{ github.run_id }} \
-a run_attempt=${{ github.run_attempt }}

Expand Down