Bump golang.org/x/text from 0.26.0 to 0.27.0 (#914) #30
This file contains hidden or 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
name: Update Latest Release | |
on: | |
push: | |
branches: [main] | |
paths: | |
- '**.go' | |
- go.mod | |
- go.sum | |
- Makefile | |
- .github/workflows/update-latest-release.yml | |
- .github/workflows/release.yml | |
permissions: | |
contents: write | |
jobs: | |
publish-latest: | |
name: Publish Latest Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- name: Build binaries and checksums | |
id: build_bins | |
env: | |
TAG_NAME: v0.0.0-dev | |
run: | | |
make build-all | |
- name: Create development release notes | |
run: | | |
test -f bin/checksums.md | |
test -f bin/k0sctl-linux-amd64 | |
COMMIT_HASH=$(git rev-parse --short ${{ github.sha }}) | |
DATE=$(date -u +"%Y-%m-%d at %H:%M UTC") | |
LATEST_STABLE_TAG=$(git tag --list 'v[0-9]*.[0-9]*.[0-9]*' --sort=version:refname | tail -n1) | |
PREV_STABLE_COMMIT=$(git rev-list -n 1 "$LATEST_STABLE_TAG") | |
REPO_URL="https://github.com/${GITHUB_REPOSITORY}" | |
{ | |
echo "## Latest Development Build" | |
echo | |
echo "This release was generated automatically from commit [\`$COMMIT_HASH\`]($REPO_URL/commit/${{ github.sha }}) on $DATE." | |
echo | |
echo "**This is a development build and may include unfinished features, bugs, or other issues. Use with caution.**" | |
echo | |
echo "### Commits since last development release:" | |
echo | |
if [ -n "$PREV_STABLE_COMMIT" ]; then | |
git log "${PREV_STABLE_COMMIT}..HEAD" --pretty=format:'- %h %s (%an)' | |
else | |
git log -n 5 --pretty=format:'- %h %s (%an)' | |
fi | |
echo | |
echo "---" | |
echo | |
cat bin/checksums.md | |
} > bin/dev.md | |
- name: Delete existing latest release and tag | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release delete dev --cleanup-tag -y || echo "No existing dev release found, proceeding." | |
git tag -d dev || echo "No local dev tag found." | |
git push origin --delete dev || echo "No remote dev tag found." | |
sleep 5 | |
- name: Create and push new dev tag | |
env: | |
COMMIT_SHA: ${{ github.sha }} | |
run: | | |
git tag dev "${COMMIT_SHA}" | |
git push origin dev | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: dev | |
name: Latest Development Build | |
body_path: bin/dev.md | |
files: | | |
bin/k0sctl-* | |
bin/checksums.txt | |
prerelease: true | |
fail_on_unmatched_files: true | |
target_commitish: ${{ github.sha }} |