-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Run the latest.txt script after release-pr. (#125)
- Loading branch information
Showing
1 changed file
with
15 additions
and
2 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 |
---|---|---|
|
@@ -24,12 +24,25 @@ jobs: | |
fetch-depth: 0 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Update package.json and latest.txt | ||
run: ./scripts/update-latest-txt.sh | ||
- name: Run release-plz | ||
uses: release-plz/[email protected] | ||
with: | ||
command: release-pr | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
# based on https://release-plz.dev/docs/github/output#example-commit-files-to-the-release-pr | ||
- name: Update package.json and latest.txt | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR: ${{ steps.release-plz.outputs.pr }} | ||
run: | | ||
set -e | ||
pr_number=${{ fromJSON(steps.release-plz.outputs.pr).number }} | ||
if [[ -n "$pr_number" ]]; then | ||
gh pr checkout $pr_number | ||
bash ./scripts/update-latest-txt.sh | ||
git add frontend/latest.txt frontend/package.json | ||
git commit -m "Update latest.text and package.json in frontend" | ||
git push | ||
fi |