Skip to content

Commit e1adcd2

Browse files
authored
Merge pull request #65 from polywrap/dev
fix: patch and publish package
2 parents 2ad0894 + 21b15e3 commit e1adcd2

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/release-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
GITHUB_TOKEN: ${{ secrets.POLYWRAP_BUILD_BOT_PAT }}
124124

125125
- name: Apply Python Version & Commit
126-
run: bash ./scripts/patchVersion.sh ${{env.RELEASE_VERSION}}
126+
run: bash ./scripts/patchVersion.sh ${{env.RELEASE_VERSION}} __token__ ${{secrets.POLYWRAP_BUILD_BOT_PYPI_PAT}}
127127

128128
- name: Create Pull Request
129129
id: cpr

scripts/patchVersion.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,44 +14,73 @@ function patchVersion() {
1414
done
1515
fi
1616
poetry lock
17+
poetry install
18+
cd $pwd
19+
}
20+
21+
function publishPackage() {
22+
local package=$1
23+
local username=$2
24+
local password=$3
25+
26+
local pwd=$(echo $PWD)
27+
28+
cd packages/$package
29+
poetry publish --build --username $username --password $password
1730
cd $pwd
1831
}
1932

2033

2134
# Patching Verion of polywrap-msgpack
2235
echo "Patching Version of polywrap-msgpack to $1"
2336
patchVersion polywrap-msgpack $1
37+
echo "Publishing polywrap-msgpack"
38+
publishPackage polywrap-msgpack $2 $3
2439

2540
# Patching Verion of polywrap-result
2641
echo "Patching Version of polywrap-result to $1"
2742
patchVersion polywrap-result $1
43+
echo "Publishing polywrap-result"
44+
publishPackage polywrap-result $2 $3
2845

2946
# Patching Verion of polywrap-manifest
3047
echo "Patching Version of polywrap-manifest to $1"
3148
deps=(polywrap-msgpack polywrap-result)
3249
patchVersion polywrap-manifest $1 deps
50+
echo "Publishing polywrap-manifest"
51+
publishPackage polywrap-manifest $2 $3
3352

3453
# Patching Verion of polywrap-core
3554
echo "Patching Version of polywrap-core to $1"
3655
deps=(polywrap-result polywrap-manifest)
3756
patchVersion polywrap-core $1 deps
57+
echo "Publishing polywrap-core"
58+
publishPackage polywrap-core $2 $3
3859

3960
# Patching Verion of polywrap-wasm
4061
echo "Patching Version of polywrap-wasm to $1"
4162
deps=(polywrap-msgpack polywrap-result polywrap-manifest polywrap-core)
4263
patchVersion polywrap-wasm $1 deps
64+
echo "Publishing polywrap-wasm"
65+
publishPackage polywrap-wasm $2 $3
4366

4467
# Patching Verion of polywrap-plugin
4568
echo "Patching Version of polywrap-plugin to $1"
4669
deps=(polywrap-msgpack polywrap-result polywrap-manifest polywrap-core)
4770
patchVersion polywrap-plugin $1 deps
71+
echo "Publishing polywrap-plugin"
72+
publishPackage polywrap-plugin $2 $3
4873

4974
# Patching Verion of polywrap-uri-resolvers
5075
echo "Patching Version of polywrap-uri-resolvers to $1"
5176
deps=(polywrap-result polywrap-wasm polywrap-core)
5277
patchVersion polywrap-uri-resolvers $1 deps
78+
echo "Publishing polywrap-uri-resolvers"
79+
publishPackage polywrap-uri-resolvers $2 $3
5380

5481
# Patching Verion of polywrap-client
5582
echo "Patching Version of polywrap-client to $1"
5683
deps=(polywrap-result polywrap-msgpack polywrap-manifest polywrap-core polywrap-uri-resolvers)
5784
patchVersion polywrap-client $1 deps
85+
echo "Publishing polywrap-client"
86+
publishPackage polywrap-client $2 $3

0 commit comments

Comments
 (0)