[UI] Updating UI assets to v0.0.66 ui-v0.0.66.zip published at https:… #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [main] | |
jobs: | |
check-version: | |
runs-on: warp-ubuntu-latest-x64-4x | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Read old version (from previous commit) | |
id: old | |
run: | | |
if git show HEAD^:Cargo.toml > old_Cargo.toml 2>/dev/null; then | |
old_version=$(grep '^version = "' old_Cargo.toml | sed -E 's/version = "([^"]+)".*/\1/') | |
echo "old_version=$old_version" >> $GITHUB_OUTPUT | |
else | |
echo "old_version=" >> $GITHUB_OUTPUT | |
fi | |
shell: bash | |
- name: Read new version (from current commit) | |
id: new | |
run: | | |
new_version=$(grep '^version = "' Cargo.toml | sed -E 's/version = "([^"]+)".*/\1/') | |
echo "new_version=$new_version" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Compare versions | |
id: compare | |
run: | | |
if [ "${{ steps.old.outputs.old_version }}" != "${{ steps.new.outputs.new_version }}" ]; then | |
echo "has-updated=true" >> $GITHUB_OUTPUT | |
else | |
echo "has-updated=false" >> $GITHUB_OUTPUT | |
fi | |
echo "old_version=${{ steps.old.outputs.old_version }}" >> $GITHUB_OUTPUT | |
echo "new_version=${{ steps.new.outputs.new_version }}" >> $GITHUB_OUTPUT | |
outputs: | |
has-updated: ${{ steps.compare.outputs.has-updated }} | |
version: ${{ steps.compare.outputs.new_version }} | |
release: | |
runs-on: warp-ubuntu-latest-x64-4x | |
name: Release | |
needs: check-version | |
permissions: | |
contents: write | |
if: ${{ needs.check-version.outputs.has-updated == 'true' }} | |
outputs: | |
upload-url: ${{ steps.create-release.outputs.upload_url }} | |
version: ${{ needs.check-version.outputs.version }} | |
tag: v${{ needs.check-version.outputs.version }} | |
artifact-name: ui-v${{ needs.check-version.outputs.version }}.zip | |
steps: | |
- run: echo "has-updated -- ${{ needs.check-version.outputs.has-updated }}" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Create a release | |
id: create-release | |
uses: ncipollo/release-action@v1 | |
with: | |
commit: ${{ github.sha }} | |
makeLatest: true | |
tag: v${{ needs.check-version.outputs.version }} | |
generateReleaseNotes: true | |
update-ui: | |
name: Update UI in restate repo | |
runs-on: warp-ubuntu-latest-x64-4x | |
needs: release | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.TOKEN_FOR_RESTATE_REPO }} | |
repository: restatedev/restate | |
- name: Update restate-web-ui version | |
run: cargo add restate-web-ui --git https://github.com/restatedev/restate-web-ui-crate --tag ${{ needs.release.outputs.tag }} --package restate-admin --optional | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.TOKEN_FOR_RESTATE_REPO }} | |
branch: update-ui-${{needs.release.outputs.tag}} | |
title: "[Restate UI] Update to ${{ needs.release.outputs.tag }}" | |
sign-commits: true | |
commit-message: | | |
[UI] Updating Restate UI to ${{ needs.release.outputs.tag }} | |
published at https://github.com/restatedev/restate-web-ui/releases/download/${{ needs.release.outputs.tag }}/ui-${{ needs.release.outputs.tag }}.zip | |
body: | | |
[UI] Updating Restate UI to ${{ needs.release.outputs.tag }} | |
published at https://github.com/restatedev/restate-web-ui/releases/download/${{ needs.release.outputs.tag }}/ui-${{ needs.release.outputs.tag }}.zip |