-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add permissions for create-release job
- Loading branch information
Mauro Lacy
committed
Aug 28, 2024
1 parent
da2130b
commit 4c11dc9
Showing
1 changed file
with
13 additions
and
19 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 |
---|---|---|
|
@@ -10,12 +10,11 @@ env: | |
jobs: | ||
build_and_upload_contracts: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: read | ||
statuses: write | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Make temporary bin | ||
run: mkdir -p /tmp/bin | ||
- name: Install ghr | ||
run: wget https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_linux_amd64.tar.gz -O - | tar -zxvf - -C /tmp/bin --wildcards --strip-components 1 */ghr | ||
- name: Build optimised Wasm binaries | ||
run: "./scripts/build-optimizer-ci.sh" | ||
- uses: actions/[email protected] | ||
|
@@ -37,7 +36,7 @@ jobs: | |
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: | | ||
Attached there are some build artifacts generated at this tag. Those are for development purposes only! Please use crates.io to find the packages of this release. | ||
Attached there are some build artifacts generated at this tag. | ||
draft: false | ||
prerelease: false | ||
- name: Upload babylon_contract | ||
|
@@ -55,8 +54,6 @@ jobs: | |
- uses: actions/[email protected] | ||
- name: Make temporary bin | ||
run: mkdir -p /tmp/bin | ||
- name: Install ghr | ||
run: wget https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_linux_amd64.tar.gz -O - | tar -zxvf - -C /tmp/bin --wildcards --strip-components 1 */ghr | ||
- name: Build and run schema generator | ||
run: |- | ||
(cd ./contracts/babylon && cargo run --bin schema) | ||
|
@@ -67,15 +64,12 @@ jobs: | |
cp -a ./contracts/*/schema/* ./schemas | ||
- name: Show data | ||
run: ls -l ./schemas | ||
- name: Publish schemas on GitHub | ||
run: |- | ||
GITHUB_TOKEN="${{ github.token }}" | ||
TAG="${{ github.ref }}" | ||
TITLE="$TAG" | ||
BODY="Attached there are some schemas and build artifacts generated at this tag. Those are for development purposes only! Please use crates.io to find the packages of this release." | ||
/tmp/bin/ghr -t "$GITHUB_TOKEN" \ | ||
-u "$CIRCLE_PROJECT_USERNAME" -r "${{ github.repository }}" \ | ||
-c "${{ github.sha }}" \ | ||
-n "$TITLE" -b "$BODY" \ | ||
-replace \ | ||
"$TAG" ./schemas/ | ||
- name: Upload schemas | ||
id: upload-schemas | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
asset_path: ./schemas | ||
asset_name: schemas |