Skip to content

Commit 59f1f1c

Browse files
authored
Merge pull request #23 from Joewizy/main
moved workflows to top directory
2 parents 909fee3 + ca195da commit 59f1f1c

4 files changed

Lines changed: 80 additions & 0 deletions

File tree

.github/mark-dark.svg

Lines changed: 4 additions & 0 deletions
Loading

.github/mark-light.svg

Lines changed: 4 additions & 0 deletions
Loading

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to release (e.g., v1.0.0)'
8+
required: true
9+
type: string
10+
dojo_version:
11+
description: 'Dojo version to use'
12+
required: true
13+
type: string
14+
15+
jobs:
16+
create-release:
17+
runs-on: ubuntu-latest
18+
env:
19+
DOJO_VERSION: ${{ inputs.dojo_version }}
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
# Setup and test with specified Dojo version
24+
- run: curl -L https://install.dojoengine.org | bash
25+
- run: /home/runner/.config/.dojo/bin/dojoup -v ${{ env.DOJO_VERSION }}
26+
- run: |
27+
/home/runner/.config/.dojo/bin/sozo build
28+
/home/runner/.config/.dojo/bin/sozo test
29+
30+
# Create tag and release
31+
- name: Create Tag
32+
run: |
33+
git tag ${{ inputs.version }}
34+
git push origin ${{ inputs.version }}
35+
36+
- name: Create Release
37+
uses: softprops/action-gh-release@v1
38+
with:
39+
tag_name: ${{ inputs.version }}
40+
name: Release ${{ inputs.version }}
41+
draft: false
42+
prerelease: false
43+
generate_release_notes: true

.github/workflows/test.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
9+
jobs:
10+
sozo-test:
11+
runs-on: ubuntu-latest
12+
env:
13+
DOJO_VERSION: v1.1.1
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: software-mansion/setup-scarb@v1
17+
with:
18+
scarb-version: "2.9.2"
19+
- run: |
20+
curl -L https://install.dojoengine.org | bash
21+
/home/runner/.config/.dojo/bin/dojoup -v ${{ env.DOJO_VERSION }}
22+
- run: |
23+
/home/runner/.config/.dojo/bin/sozo build
24+
/home/runner/.config/.dojo/bin/sozo test
25+
if [[ `git status --porcelain` ]]; then
26+
echo The git repo is dirty
27+
echo "Make sure to run \"sozo build\" after changing Scarb.toml"
28+
exit 1
29+
fi

0 commit comments

Comments
 (0)