Skip to content

Commit

Permalink
Automatically update release in README (#2226)
Browse files Browse the repository at this point in the history
This adds a step to the release creation job to create a PR changing the
pinned II versions in the download links. This also updates the README
to the latest II release (`2024-01-05`).
  • Loading branch information
nmattia committed Jan 23, 2024
1 parent 182478b commit b8a1a03
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/canister-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,40 @@ jobs:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


# Bump the version in the download links and create A Pull Request
- name: Update README
env:
PREVIOUS_RELEASE_TAG: ${{ steps.latest-release-tag.outputs.result }}
NEW_RELEASE_TAG: ${{ github.ref_name }}
run: |
echo "II release: $PREVIOUS_RELEASE_TAG -> $NEW_RELEASE_TAG"
sed -i "s/$PREVIOUS_RELEASE_TAG/$NEW_RELEASE_TAG/g" ./README.md
cat ./README.md
- name: Create Pull Request
if: startsWith(github.ref, 'refs/tags/release-')
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GIX_BOT_PAT }}
base: main
add-paths: ./README
commit-message: Update release in README
committer: GitHub <noreply@github.com>
author: gix-bot <gix-bot@users.noreply.github.com>
branch: bot-release-readme-update
delete-branch: true
title: 'Update release in README'

# Since this may be triggered on tag push, a failure won't be shown on any
# PR status. To notify the team, we send a message to our Slack channel on failure.
- name: Notify Slack on failure
uses: ./.github/actions/slack
if: ${{ startsWith(github.ref, 'refs/tags/') && failure() }}
with:
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MESSAGE: "Release creation failed"

# A native, fast cached build. We use the produced test assets to run the canister & e2e tests.
# The asset's checksum is compared against that of the (slower) docker build.
cached-build:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Use the Internet Identity canister in your local dfx project by adding the follo
"canisters": {
"internet_identity": {
"type": "custom",
"candid": "https://github.com/dfinity/internet-identity/releases/download/release-2023-11-17/internet_identity.did",
"wasm": "https://github.com/dfinity/internet-identity/releases/download/release-2023-11-17/internet_identity_dev.wasm.gz",
"candid": "https://github.com/dfinity/internet-identity/releases/download/release-2024-01-05/internet_identity.did",
"wasm": "https://github.com/dfinity/internet-identity/releases/download/release-2024-01-05/internet_identity_dev.wasm.gz",
"remote": {
"id": {
"ic": "rdmx6-jaaaa-aaaaa-aaadq-cai"
Expand Down

0 comments on commit b8a1a03

Please sign in to comment.