Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI Workflow to Automatically Label and Tag PRs for feat-token-extensions Branch #93

Merged
merged 2 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/label-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Label PRs for feat-token-extensions

on:
pull_request:
branches:
- feat-token-extensions

jobs:
tag-and-label:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up GitHub CLI
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install GitHub CLI
run: |
npm install -g @actions/github-script

- name: Add label to PR
uses: actions/github-script@v7
with:
script: |
github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['feat-token-extensions']
})

- name: Add Tag to PR Title
run: |
gh pr edit ${{ github.event.pull_request.number }} --add-label "feat-token-extensions"
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: release
on:
push:
tags:
- 'v*.*.*'
- "v*.*.*"

jobs:
artifact:
Expand All @@ -12,11 +12,13 @@ jobs:
pull-requests: write
name: artifact
runs-on: ubuntu-latest
env:
env:
working-directory: ./contracts
steps:
- uses: actions/checkout@v4
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.6.5"
- name: Build contracts
working-directory: ${{ env.working-directory}}
run: scarb build
Expand All @@ -41,7 +43,7 @@ jobs:
cd ..
sha256sum hyperlane-starknet-${{ github.ref_name }}.zip > hyperlane-starknet-${{ github.ref_name }}.CHECKSUM
md5sum hyperlane-starknet-${{ github.ref_name }}.zip > hyperlane-starknet-${{ github.ref_name }}.CHECKSUM.MD5

- name: Find zip files
working-directory: ${{ env.working-directory}}
run: |
Expand All @@ -55,5 +57,3 @@ jobs:
./contracts/hyperlane-starknet-${{ github.ref_name }}.zip
./contracts/hyperlane-starknet-${{ github.ref_name }}.CHECKSUM
./contracts/hyperlane-starknet-${{ github.ref_name }}.CHECKSUM.MD5


8 changes: 4 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:

- uses: Swatinem/rust-cache@v2
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.6.5"

- name: Build contracts
run: |
Expand All @@ -29,7 +31,7 @@ jobs:
- name: Install dojoup
run: |
curl -L https://install.dojoengine.org | bash

- name: Install dojo
run: |-
/home/runner/.config/.dojo/bin/dojoup -v 0.7.0-alpha.2
Expand All @@ -53,9 +55,7 @@ jobs:
- name: run katana
run: |
katana -b 1000 &

- name: Run strk -> evm test
run: |
cd rust && cargo test -- test_mailbox_strk_to_evm


11 changes: 5 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ on:
jobs:
contracts:
runs-on: ubuntu-latest
env:
env:
working-directory: ./contracts
steps:
- uses: actions/checkout@v3

- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.6.5"
- uses: foundry-rs/setup-snfoundry@v3
with:
starknet-foundry-version: '0.22.0'
starknet-foundry-version: "0.22.0"
- working-directory: ${{ env.working-directory}}
run: scarb fmt --check

Expand All @@ -29,6 +31,3 @@ jobs:
run: scarb build
- working-directory: ${{ env.working-directory}}
run: snforge test



Loading