Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 13 additions & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@ jobs:
run: hack/tag-release.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Sign in to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GOOGLE_BUCKET_CREDS_JSON }}

- name: Upload archive to Google Bucket
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: dist
glob: '*.tar.gz'
parent: false
destination: 'codesphere-oms-builds/tag/oms-${{ env.RELEASE_VERSION }}/${{ env.FOLDER }}'
12 changes: 12 additions & 0 deletions hack/tag-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,15 @@ git push origin "$NEWTAG"
echo "Triggering release of version $NEWTAG"
go install github.com/goreleaser/goreleaser/v2@latest
goreleaser release --clean

cd dist
for ARCH in darwin_arm64 darwin_amd64 linux_amd64 linux_arm64; do
tar cf $ARCH.tar.gz *$ARCH*/* CHANGELOG.md
done
cd ..

echo "RELEASE_VERSION=$NEWTAG" >> $GITHUB_ENV

# Hash length fixed to 10 characters to get deterministic folder names
FOLDER="$(git rev-parse --short=10 HEAD)"
echo "FOLDER=$FOLDER" >> $GITHUB_ENV