Files
revive/.github/workflows/generate_versions.yml
T
LJ 1e6a631bc0 Fix resolc-bin push auth (#543)
Pushes to `resolc-bin` 403ed after bumping `actions/checkout` to `v6`
(detected by [failure of the nightly
release](https://github.com/paritytech/revive/actions/runs/27049132601/job/79841157330)).
This PR now passes the app token to the resolc-bin checkout via
[`token:`](https://github.com/actions/checkout/blob/df4cb1c069e1874edd31b4311f1884172cec0e10/README.md?plain=1#L66-L76)
and drops the remote-URL/sed workaround.
2026-06-06 11:45:35 +02:00

60 lines
2.1 KiB
YAML

name: Generate JSON for resolc-bin
on:
release:
types: [published]
jobs:
generateJson:
runs-on: ubuntu-latest
if: contains(github.event.release.tag_name, 'llvm') == false
environment: tags
env:
# the token is needed for json_generator.py
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
path: tmp
- uses: actions/create-github-app-token@v3
id: app-token
with:
app-id: ${{ secrets.REVIVE_JSON_APP_ID }}
private-key: ${{ secrets.REVIVE_JSON_APP_KEY }}
owner: paritytech
repositories: resolc-bin
- name: Checkout
uses: actions/checkout@v6
with:
repository: paritytech/resolc-bin
path: resolc-bin
token: ${{ steps.app-token.outputs.token }}
- name: Generate json and push
env:
APP_NAME: "paritytech-revive-json"
run: |
sudo apt-get update && sudo apt-get install -y wget
wget https://github.com/${GITHUB_REPOSITORY}/releases/download/${GITHUB_REF_NAME}/resolc-x86_64-unknown-linux-musl
chmod +x resolc-x86_64-unknown-linux-musl
export FIRST_SOLC_VERSION=$(./resolc-x86_64-unknown-linux-musl --supported-solc-versions | cut -f 1 -d "," | tr -d ">=")
export LAST_SOLC_VERSION=$(./resolc-x86_64-unknown-linux-musl --supported-solc-versions | cut -f 2 -d "," | tr -d "<=")
cd resolc-bin
python ../tmp/.github/scripts/json_generator.py ${GITHUB_REPOSITORY} ${{ github.event.release.tag_name }}
# Update GitHub Pages file with the JSON data.
chmod +x ../tmp/.github/scripts/resolc-bin-gh-pages.sh
bash ../tmp/.github/scripts/resolc-bin-gh-pages.sh $PWD
git config user.email "ci@parity.io"
git config user.name "${APP_NAME}"
git add .
git commit -m "Update json"
git push origin main
echo "::notice::info.list files were successfully published to https://github.com/paritytech/resolc-bin"