-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update version Signed-off-by: Nik Nasr <[email protected]> Create PR in restate repo fix sha256sum Signed-off-by: Nik Nasr <[email protected]> revert package version Signed-off-by: Nik Nasr <[email protected]>
- Loading branch information
Showing
3 changed files
with
78 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,39 @@ | ||
on: | ||
push: | ||
tags: | ||
- 'v**' | ||
branches: [main] | ||
jobs: | ||
check-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: johnnybenson/[email protected] | ||
id: package-json | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN_FOR_RESTATE_REPO }} | ||
- run: echo "has-updated -- ${{ steps.package-json.outputs.has-updated }}" | ||
outputs: | ||
has-updated: ${{ steps.package-json.outputs.has-updated }} | ||
version: ${{ steps.package-json.outputs.version }} | ||
release: | ||
runs-on: ubuntu-latest | ||
name: Release | ||
needs: check-version | ||
permissions: | ||
contents: write | ||
name: Release | ||
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 }}" | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
|
@@ -18,9 +43,52 @@ jobs: | |
fetch-depth: 0 | ||
- run: pnpm install --frozen-lockfile | ||
- run: pnpm nx build web-ui --skip-nx-cache | ||
- run: cd dist/apps/web-ui && zip -r ../../../ui-${{ github.ref_name }}.zip . | ||
- run: cd dist/apps/web-ui && zip -r ../../../ui-v${{ needs.check-version.outputs.version }}.zip . | ||
- name: Create a release | ||
id: create-release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: ui-${{ github.ref_name }}.zip | ||
commit: ${{ github.sha }} | ||
makeLatest: true | ||
tag: v${{ needs.check-version.outputs.version }} | ||
artifacts: ui-v${{ needs.check-version.outputs.version }}.zip | ||
generateReleaseNotes: true | ||
update-ui: | ||
name: Update UI in restate repo | ||
runs-on: ubuntu-latest | ||
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: Download artifact | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
version: tags/${{ needs.release.outputs.tag }} | ||
file: ${{ needs.release.outputs.artifact-name }} | ||
target: ./crates/web-ui/archive.zip | ||
token: ${{ secrets.TOKEN_FOR_RESTATE_REPO }} | ||
- name: Calculate SHA256 checksum and set as env var | ||
run: | | ||
echo "FILE_SHA256=$(sha256sum ./crates/web-ui/archive.zip | awk '{print $1}')" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
token: ${{ secrets.TOKEN_FOR_RESTATE_REPO }} | ||
draft: true | ||
branch: update-ui-${{needs.release.outputs.tag}} | ||
title: '[Restate UI] Update to ${{ needs.release.outputs.tag }}' | ||
commit-message: | | ||
Version: ${{ needs.release.outputs.tag }} | ||
Release: https://github.com/restatedev/restate-web-ui/releases/tag/${{ needs.release.outputs.tag }} | ||
sha256sum: ${{ env.FILE_SHA256 }} | ||
body: | | ||
- Version: ${{ needs.release.outputs.tag }} | ||
- Release: https://github.com/restatedev/restate-web-ui/releases/tag/${{ needs.release.outputs.tag }} | ||
- sha256sum: ${{ env.FILE_SHA256 }} |
This file contains 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
This file contains 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