Skip to content

Fix release celo dollars transfer (#713) #474

Fix release celo dollars transfer (#713)

Fix release celo dollars transfer (#713) #474

Workflow file for this run

name: Release Packages
on:
push:
branches:
- master
- hotfixes
- feat/release-13
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Open Release PR or Publish Packages
permissions:
contents: write
actions: read
pull-requests: write
security-events: write
attestations: write
id-token: write
repository-projects: write
uses: celo-org/reusable-workflows/.github/workflows/npm-publish.yaml@v3.0.0
with:
node-version: 20
version-command: yarn version-then-update-files
publish-command: yarn release
# release gives an array of published packages as json objects, we need an array of strings for installing
prepare:
name: Format Output for Install
if: needs.release.outputs.published == 'true'
needs: release
runs-on: ['self-hosted', 'org', 'ubuntu-22-04']
container:
image: node:20-bullseye
outputs:
result: '${{ steps.map.outputs.output }}'
steps:
- name: Install jq
uses: dcarbone/install-jq-action@v3.0.1
- name: Format Published Packages Array
uses: cloudposse/github-action-jq@main
id: map
with:
compact: true
raw-output: true
input: '${{ needs.release.outputs.publishedPackages }}'
script: |-
map("\(.name)@\(.version)")
# last line of defense to ensure that the packages were published correctly
install-released-packages:
name: Install Released Packages
needs: [prepare, release]
outputs:
assetStableCLIRelease: ${{ steps.assertStableVersion.outcome }}
if: needs.release.outputs.published == 'true' && needs.prepare.outputs.result
runs-on: ['self-hosted', 'org', 'ubuntu-22-04']
container:
image: node:20-bullseye
strategy:
fail-fast: false
max-parallel: 12
matrix:
package: ${{fromJson(needs.prepare.outputs.result)}}
steps:
- name: Install @celo/celocli dependencies
if: contains(matrix.package, '@celo/celocli')
run: |
apt update
apt install -y libusb-1.0-0-dev libudev-dev
npm install node-gyp --global
- name: Installing ${{ matrix.package }} package
run: npm install ${{ matrix.package }} --global
- name: Ensure sample of celocli commands run
if: contains(matrix.package, '@celo/celocli')
run: |
celocli --version
celocli account:new
echo "checking celo community fund balance"
celocli account:balance 0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972 --node celo
celocli network:whitelist --node alfajores
- name: Checkout Repo
if: contains(matrix.package, '@celo/celocli')
uses: actions/checkout@v4
with:
sparse-checkout: |
scripts
- name: Is stable celocli release
id: assertStableVersion
if: contains(matrix.package, '@celo/celocli')
continue-on-error: true
run: |
version=$(echo "${{ matrix.package }}" | cut -d "@" -f3)
./scripts/assert_stable_version "$version"
open-docs-pr:
needs: [install-released-packages]
if: ${{ needs.install-released-packages.outputs.assetStableCLIRelease != 'failure' }}
uses: celo-org/developer-tooling/.github/workflows/open-docs-pr.yml@master
with:
commit: ${{ github.sha }}
upload-executables:
needs: [install-released-packages]
if: ${{ needs.install-released-packages.outputs.assetStableCLIRelease != 'failure' }}
uses: celo-org/developer-tooling/.github/workflows/upload-celocli-executables.yml@master
with:
ref: ${{ github.sha }}