Release Autolith 0.23.1 #38
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| publish-metadata: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Validate tag | |
| shell: bash | |
| run: | | |
| version=$(sed -n 's/^ :version "\([0-9][0-9.]*\)"$/\1/p' autolith.asd) | |
| test "v$version" = "$GITHUB_REF_NAME" | |
| test -s "docs/releases/$GITHUB_REF_NAME.md" | |
| - name: Publish GitHub release metadata | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then | |
| exit 0 | |
| else | |
| gh release create "$GITHUB_REF_NAME" \ | |
| --verify-tag \ | |
| --notes-file "docs/releases/$GITHUB_REF_NAME.md" \ | |
| --title "Autolith ${GITHUB_REF_NAME#v}" | |
| fi | |
| - name: Wait for the release service | |
| shell: bash | |
| run: | | |
| archive=autolith-"$GITHUB_REF_NAME"-x86_64-linux.tar.gz | |
| checksum_url=https://sh.lambda-symbolics.com/releases/"$GITHUB_REF_NAME"/"$archive".sha256 | |
| for attempt in $(seq 1 120); do | |
| if curl --fail --silent --show-error --head "$checksum_url"; then | |
| exit 0 | |
| fi | |
| sleep 30 | |
| done | |
| printf 'GitHub metadata for %s is published, but the release service has not published the Linux archive checksum yet.\n' "$GITHUB_REF_NAME" >&2 | |
| exit 0 |