Skip to content

Add Verus update test workflow #8

Add Verus update test workflow

Add Verus update test workflow #8

name: rolling-release
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
concurrency:
group: rolling-release
cancel-in-progress: true
jobs:
# build the release artifacts
build:
if: github.repository == 'verus-lang/verus'
uses: ./.github/workflows/build.yml
with:
checkout_ref: ${{ github.sha }}
is_rolling: true
# publish the release artifacts to the rolling pre-release
publish:
needs: [build]
runs-on: ubuntu-24.04
steps:
- name: download all artifacts
uses: actions/download-artifact@v8
- name: create release tag
shell: bash
run: |
version="${{ needs.build.outputs.version }}"
{
echo "TAG_NAME=release/rolling/${version}"
echo "RELEASE_NAME=${version}"
} >> "$GITHUB_ENV"
echo "${version}"
- name: list artifacts
run: ls -Al .
- name: update release
id: update_release
uses: verus-lang/action-update-release@v0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: 163437062
new_name: Rolling Release ${{ env.RELEASE_NAME }}
new_body: |
Rolling release from Continuous Integration
delete_tags_prefix: release/rolling/
delete_assets: true
new_draft_status: true
- name: upload release for x86-linux
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_URL: ${{ steps.update_release.outputs.upload_url }}
run: |
curl -fsSL -X POST \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Content-Type: application/zip" \
--data-binary @./verus-x86-linux/verus-x86-linux.zip \
"${UPLOAD_URL%%\{*}?name=verus-${{ env.RELEASE_NAME }}-x86-linux.zip"
- name: upload release for arm64-macos
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_URL: ${{ steps.update_release.outputs.upload_url }}
run: |
curl -fsSL -X POST \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Content-Type: application/zip" \
--data-binary @./verus-arm64-macos/verus-arm64-macos.zip \
"${UPLOAD_URL%%\{*}?name=verus-${{ env.RELEASE_NAME }}-arm64-macos.zip"
- name: upload release for x86-macos
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_URL: ${{ steps.update_release.outputs.upload_url }}
run: |
curl -fsSL -X POST \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Content-Type: application/zip" \
--data-binary @./verus-x86-macos/verus-x86-macos.zip \
"${UPLOAD_URL%%\{*}?name=verus-${{ env.RELEASE_NAME }}-x86-macos.zip"
- name: upload release for x86-win
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_URL: ${{ steps.update_release.outputs.upload_url }}
run: |
curl -fsSL -X POST \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Content-Type: application/zip" \
--data-binary @./verus-x86-win/verus-x86-win.zip \
"${UPLOAD_URL%%\{*}?name=verus-${{ env.RELEASE_NAME }}-x86-win.zip"
- name: publish release
uses: verus-lang/action-update-release@v0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: 163437062
new_tag: ${{ env.TAG_NAME }}
new_draft_status: false