Skip to content

Commit 30098cd

Browse files
committed
Bump deps, use scarb in nightly
commit-id:fa08970b
1 parent d114d09 commit 30098cd

File tree

21 files changed

+225
-147
lines changed

21 files changed

+225
-147
lines changed

.github/workflows/_build-plugin-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
112112
PACKAGE_NAME=${{ inputs.plugin_name }}
113113
PACKAGE_NAME=${PACKAGE_NAME//-/_} # Replace `-` with `_` in name
114-
PACKAGE_VERSION=$(get_version "${{ inputs.overridden_plugin_version }}")
114+
PACKAGE_VERSION=$(get_version "${{ inputs.overridden_plugin_version }}" "crates/${{ inputs.plugin_name }}/Scarb.toml")
115115
116116
TARGET="${{ matrix.target }}"
117117
EXT="${{ matrix.ext }}"

.github/workflows/_publish-plugin.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
plugin_name_underscores=${{ inputs.plugin_name }}
3333
plugin_name_underscores=${plugin_name_underscores//-/_}
34-
plugin_version=$(get_version "${{ inputs.overridden_plugin_version }}")
34+
plugin_version=$(get_version "${{ inputs.overridden_plugin_version }}" "crates/${{ inputs.plugin_name }}/Scarb.toml")
3535
3636
registry_url=${{ inputs.prod_registry == true && 'https://scarbs.xyz' || 'https://scarbs.dev' }}
3737
plugin_uploaded=$(curl -s ${registry_url}/api/v1/index/sn/fo/${plugin_name_underscores}.json | jq --arg version "$plugin_version" '[.[] | select(.v == $version)] | length > 0')
@@ -78,7 +78,7 @@ jobs:
7878
fi
7979
8080
- name: Publish ${{ inputs.plugin_name }}
81-
if: needs.check-uploaded.outputs.plugin_uploaded == 'false' || github.event_name == 'workflow_dispatch'
81+
if: needs.check-uploaded.outputs.plugin_uploaded == 'false'
8282
working-directory: crates/${{ inputs.plugin_name }}
8383
run: |
8484
set -exo pipefail
@@ -87,4 +87,4 @@ jobs:
8787
update_version_in_file "Scarb.toml" "${{ inputs.overridden_plugin_version }}"
8888
update_version_in_file "Cargo.toml" "${{ inputs.overridden_plugin_version }}"
8989
90-
scarb publish --allow-dirty ${{ inputs.prod_registry == true && ' ' || '--index https://scarbs.dev/' }}
90+
scarb publish --allow-dirty ${{ inputs.prod_registry == true && ' ' || '--index https://scarbs.dev/' }} ${{ inputs.overridden_plugin_version == 'snforge-scarb-plugin-compatibility' && '--ignore-cairo-version' || ' ' }}

.github/workflows/nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ jobs:
4848
echo "nightly_version=$NIGHTLY_VERSION" >> $GITHUB_OUTPUT
4949
echo "nightly_branch=$NIGHTLY_BRANCH" >> $GITHUB_OUTPUT
5050
51+
- uses: software-mansion/setup-scarb@v1
52+
5153
- name: Update metadata before release
5254
run: ./scripts/release.sh ${{ env.NIGHTLY_VERSION }}
5355

.github/workflows/publish-std.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,39 @@ on:
3131
type: string
3232

3333
jobs:
34+
check-uploaded:
35+
name: Check stds uploaded
36+
runs-on: ubuntu-latest
37+
outputs:
38+
snforge_std_uploaded: ${{ steps.check-uploaded.outputs.snforge_std_uploaded }}
39+
snforge_std_compatibility_uploaded: ${{ steps.check-uploaded.outputs.snforge_std_compatibility_uploaded }}
40+
sncast_std_uploaded: ${{ steps.check-uploaded.outputs.sncast_std_uploaded }}
41+
steps:
42+
- uses: actions/checkout@v4
43+
- name: Check version
44+
id: check-uploaded
45+
run: |
46+
set -exo pipefail
47+
48+
source scripts/handle_version.sh
49+
50+
snforge_std_version=$(get_version "${{ inputs.override_std_version }}" "snforge_std")
51+
snforge_std_compatibility_version=$(get_version "${{ inputs.override_std_version }}" "snforge_std_compatibilty")
52+
sncast_std_version=$(get_version "${{ inputs.override_std_version }}" "sncast_std")
53+
54+
registry_url=${{ inputs.prod_registry == true && 'https://scarbs.xyz' || 'https://scarbs.dev' }}
55+
56+
snforge_std_uploaded=$(curl -s ${registry_url}/api/v1/index/sn/fo/snforge_std.json | jq --arg version "$snforge_std_version" '[.[] | select(.v == $version)] | length > 0')
57+
snforge_std_compatibility_uploaded=$(curl -s ${registry_url}/api/v1/index/sn/fo/snforge_std_compatibility.json | jq --arg version "$snforge_std_compatibility_version" '[.[] | select(.v == $version)] | length > 0')
58+
sncast_std_uploaded=$(curl -s ${registry_url}/api/v1/index/sn/ca/sncast_std.json | jq --arg version "$sncast_std_version" '[.[] | select(.v == $version)] | length > 0')
59+
60+
echo "snforge_std_uploaded=$snforge_std_uploaded" >> $GITHUB_OUTPUT
61+
echo "snforge_std_compatibility_uploaded=$snforge_std_compatibility_uploaded" >> $GITHUB_OUTPUT
62+
echo "sncast_std_uploaded=$sncast_std_uploaded" >> $GITHUB_OUTPUT
3463
publish-to-registry:
3564
name: Publish packages to the registry
3665
runs-on: ubuntu-latest
66+
needs: [ check-uploaded ]
3767
env:
3868
SCARB_REGISTRY_AUTH_TOKEN: ${{ inputs.prod_registry == true && secrets.SCARB_REGISTRY_AUTH_TOKEN || secrets.DEV_SCARB_REGISTRY_AUTH_TOKEN }}
3969
steps:
@@ -46,6 +76,7 @@ jobs:
4676
- uses: software-mansion/setup-scarb@v1
4777

4878
- name: Publish sncast_std
79+
if: needs.check-uploaded.outputs.sncast_std_uploaded == 'false'
4980
working-directory: sncast_std
5081
run: |
5182
source ../scripts/handle_version.sh
@@ -55,6 +86,7 @@ jobs:
5586
scarb publish --allow-dirty ${{ inputs.prod_registry == true && ' ' || '--index https://scarbs.dev/' }}
5687
5788
- name: Publish snforge_std
89+
if: needs.check-uploaded.outputs.snforge_std_uploaded == 'false'
5890
working-directory: snforge_std
5991
run: |
6092
source ../scripts/handle_version.sh
@@ -71,6 +103,7 @@ jobs:
71103
scarb publish --allow-dirty ${{ inputs.prod_registry == true && ' ' || '--index https://scarbs.dev/' }}
72104
73105
- name: Publish snforge_std_compatibility
106+
if: needs.check-uploaded.outputs.snforge_std_compatibility_uploaded == 'false'
74107
working-directory: snforge_std_compatibility
75108
run: |
76109
source ../scripts/handle_version.sh
@@ -84,4 +117,4 @@ jobs:
84117
rm Scarb.toml.bak 2>/dev/null
85118
fi
86119
87-
scarb publish --allow-dirty ${{ inputs.prod_registry == true && ' ' || '--index https://scarbs.dev/' }}
120+
scarb publish --allow-dirty ${{ inputs.prod_registry == true && ' ' || '--index https://scarbs.dev/' }} --ignore-cairo-version

.github/workflows/scheduled.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
uses: mikefarah/yq@8bf425b4d1344db7cd469a8d10a390876e0c77fd
138138
with:
139139
cmd: yq -oy '.workspace.package.version' 'Cargo.toml'
140-
140+
141141
- name: Return version
142142
id: validVersion
143143
run: |
@@ -154,7 +154,7 @@ jobs:
154154
plugin_name: 'snforge-scarb-plugin'
155155

156156
publish-plugin:
157-
needs: [get-version, build-plugin-binaries]
157+
needs: [ get-version, build-plugin-binaries ]
158158
uses: ./.github/workflows/_publish-plugin.yml
159159
secrets: inherit
160160
with:
@@ -170,23 +170,23 @@ jobs:
170170
plugin_name: 'snforge-scarb-plugin-compatibility'
171171

172172
publish-compatibility-plugin:
173-
needs: [get-version, build-compatibility-plugin-binaries]
173+
needs: [ get-version, build-compatibility-plugin-binaries ]
174174
uses: ./.github/workflows/_publish-plugin.yml
175175
secrets: inherit
176176
with:
177177
overridden_plugin_version: ${{ needs.get-version.outputs.version }}-test.${{ github.run_id }}
178178
plugin_name: 'snforge-scarb-plugin-compatibility'
179179

180180
publish-std:
181-
needs: [get-version, publish-plugin, publish-compatibility-plugin]
181+
needs: [ get-version, publish-plugin, publish-compatibility-plugin ]
182182
uses: ./.github/workflows/publish-std.yml
183183
secrets: inherit
184184
with:
185185
plugin_dep_version: ${{ needs.get-version.outputs.version }}-test.${{ github.run_id }}
186186
override_std_version: ${{ needs.get-version.outputs.version }}-test.${{ github.run_id }}
187187

188188
build-binaries:
189-
needs: [get-version]
189+
needs: [ get-version ]
190190
uses: ./.github/workflows/_build-binaries.yml
191191
with:
192192
version: ${{ needs.get-version.outputs.version }}-test.${{ github.run_id }}

0 commit comments

Comments
 (0)