diff --git a/.github/workflows/rc-tag-update.yml b/.github/workflows/rc-tag-update.yml deleted file mode 100644 index 03f3b80f8db..00000000000 --- a/.github/workflows/rc-tag-update.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: RC git tag update -on: - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.2.0 - - run: | - # retag old rc tag - old=$(git rev-list -n 1 rc-latest) - if [ $? -eq 0 ]; then - date=$(git show -s --format=%ci rc | awk '{print $1}') - git tag --delete rc-latest - git push origin --delete rc-latest - git tag rc-$date $old - git push origin rc-$date - else - echo "RC tagging starts from scratch" - fi - # tag new rc-latest - id=$(curl -X GET -H "Authorization: Bearer ${BUILDKITE_API_TOKEN}" \ - "https://api.buildkite.com/v2/organizations/cardano-foundation/pipelines/cardano-wallet/builds" \ - | jq -r '[.[] | select(.state == "passed" and .branch == "master") | .commit][0]') - git tag rc-latest $id - git push origin rc-latest diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml new file mode 100644 index 00000000000..bb12309c796 --- /dev/null +++ b/.github/workflows/release-candidate.yml @@ -0,0 +1,18 @@ +name: Release candidate daily fork +on: + schedule: + - cron: '0 20 * * *' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + with: + fetch-tags: true + fetch-depth: 0 + - run: ./scripts/release-candidate.sh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }} diff --git a/README.md b/README.md index bb1b10b1c26..512059683f2 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ docker-compose up docker-compose down ``` -Fantastic! The server is up-and-running, waiting for HTTP requests on `localhost:8090/v2` e.g.: +Fantastic! server is up-and-running, waiting for HTTP requests on `localhost:8090` ``` curl http://localhost:8090/v2/network/information @@ -128,15 +128,6 @@ NixOS users can also use the [NixOS service](https://cardano-foundation.github.i We provide executables as part of our [releases](https://github.com/cardano-foundation/cardano-wallet/releases). Please also see the installation instructions highlighted in the release notes. -> **Latest releases** -> -> | cardano-wallet | cardano-node (compatible versions) | -> | --- | --- | -> | [v2023-12-18](https://github.com/cardano-foundation/cardano-wallet/releases/tag/v2023-12-18) | [8.1.2](https://github.com/input-output-hk/cardano-node/releases/tag/8.1.2) | -> | [v2023-07-18](https://github.com/cardano-foundation/cardano-wallet/releases/tag/v2023-07-18) | [8.1.1](https://github.com/input-output-hk/cardano-node/releases/tag/8.1.1) | -> | [v2023-04-14](https://github.com/cardano-foundation/cardano-wallet/releases/tag/v2023-04-14) | [1.35.4](https://github.com/input-output-hk/cardano-node/releases/tag/1.35.4) | -> | [v2022-12-14](https://github.com/cardano-foundation/cardano-wallet/releases/tag/v2022-12-14) | [1.35.4](https://github.com/input-output-hk/cardano-node/releases/tag/1.35.4) | - ### Building from source See [Building](https://cardano-foundation.github.io/cardano-wallet/contributor/what/building.html) diff --git a/scripts/release-candidate.sh b/scripts/release-candidate.sh new file mode 100755 index 00000000000..ba1f5d333cb --- /dev/null +++ b/scripts/release-candidate.sh @@ -0,0 +1,58 @@ +#! /usr/bin/env bash + +set -euo pipefail + +# date from git tag +# example v2023-04-04 -> 2023-04-04 +tag_date() { + echo "${1##v}" +} +# cabal version from git tag +# example v2023-04-04 -> 2023.4.4 +tag_cabal_ver() { + tag_date "$1" | sed -e s/-0/-/g -e s/-/./g +} + +BASE_COMMIT=$(curl -X GET -H "Authorization: Bearer ${BUILDKITE_API_TOKEN}" \ + "https://api.buildkite.com/v2/organizations/cardano-foundation/pipelines/cardano-wallet/builds" \ + | jq -r \ + '[.[] | select(.state == "passed" and .branch == "master") | .commit][0]') + +echo "BASE_COMMIT=$BASE_COMMIT" + +today=$(date +%Y-%m-%d) + +NEW_GIT_TAG=v$today +echo "NEW_GIT_TAG=$NEW_GIT_TAG" + +NEW_CABAL_VERSION=$(tag_cabal_ver "$NEW_GIT_TAG") +echo "NEW_CABAL_VERSION=$NEW_CABAL_VERSION" + +OLD_GIT_TAG=$( git tag -l "v2*-*-*" | sort | tail -n1) +echo "OLD_GIT_TAG=$OLD_GIT_TAG" + +OLD_CABAL_VERSION=$(tag_cabal_ver "$OLD_GIT_TAG") +echo "OLD_CABAL_VERSION=$OLD_CABAL_VERSION" + +CARDANO_NODE_TAG="8.1.2" +echo "CARDANO_NODE_TAG=$CARDANO_NODE_TAG" + +git checkout "$BASE_COMMIT" + +git config --global user.email "gha@cardanofoundation.org" +git config --global user.name "Github Action" + +git checkout -b release-candidate/"$NEW_GIT_TAG" || true + +sed -i "s|version: .*|version: $NEW_GIT_TAG|" specifications/api/swagger.yaml +git commit -m "Update wallet version in swagger.yaml" specifications/api/swagger.yaml + +git ls-files '*.cabal' | xargs sed -i "s/$OLD_CABAL_VERSION/$NEW_CABAL_VERSION/" +git commit -am "Update cardano-wallet version in *.cabal files" + +sed -i "s|NODE_TAG=.*|NODE_TAG=$CARDANO_NODE_TAG|" README.md +sed -i "s|WALLET_TAG=.*|WALLET_TAG=$NEW_CABAL_VERSION|" README.md +sed -i "s|WALLET_VERSION=.*|WALLET_VERSION=$NEW_GIT_TAG|" README.md +git commit -am "Update cardano-wallet version in README.md" + +git push -f origin release-candidate/"$NEW_GIT_TAG"