Skip to content

Check Polkadot Releases #674

Check Polkadot Releases

Check Polkadot Releases #674

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Check Polkadot Releases
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # midnight (UTC)
env:
REPO_URL: https://api.github.com/repos/paritytech/polkadot-sdk
TRACKING_GIT_BRANCH: ci/latest-polkadot-full-release
RELEASE_TRACK_FILENAME: .github/.latest-polkadot-full-release.txt
jobs:
record-polkadot-latest-release-version:
runs-on: ubuntu-latest
steps:
- name: Timestamp
run: date
- name: Check Out Repo
uses: actions/checkout@v4
with:
ref: ${{env.TRACKING_GIT_BRANCH}}
# While you can write to a branch without it, it will not trigger the workflow
token: ${{secrets.GHA_RECORD_POLKADOT_RELEASE}}
- name: Print Recorded Latest Polkadot Release
run: |
echo "Recorded Polkadot Latest Full Release:"
echo "--------------------------------------"
cat ${{env.RELEASE_TRACK_FILENAME}}
- name: Fetch Latest Release Version
run: |
curl -sL $REPO_URL/releases/latest | \
jq -r ".tag_name" > ${{env.RELEASE_TRACK_FILENAME}}
echo "Fetched Polkadot Latest Full Release:"
echo "-------------------------------------"
cat ${{env.RELEASE_TRACK_FILENAME}}
- name: Commit Latest Release Version
id: commit-updated-release
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842
with:
commit_message: "Record new Polkadot release version"
commit_user_name: Frequency CI [bot]
commit_user_email: [email protected]
commit_author: Frequency CI [bot] <[email protected]>