Skip to content

Commit be268f2

Browse files
authored
Merge pull request #95 from OctopusDeploy/buildblockblobreader
Build and package BlockBlobReader functions when tagging releases to support zip deployment
2 parents 2cbcc40 + 776da09 commit be268f2

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/npm-publish-github-packages.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,82 @@ on:
99
- "v*"
1010

1111
jobs:
12+
build-blockblobreader:
13+
name: Build BlockBlobReader
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
cache: "npm"
20+
node-version: 18
21+
cache-dependency-path: '**/package-lock.json'
22+
23+
- name: Create packages
24+
run: |
25+
cd BlockBlobReader/target
26+
27+
echo "Installing npm modules for BlobTaskConsumer..."
28+
cd consumer_build
29+
npm install
30+
cd ..
31+
32+
echo "Installing npm modules for DLQConsumer..."
33+
cd dlqprocessor_build
34+
npm install
35+
cd ..
36+
37+
echo "Installing npm modules for BlobTaskConsumer..."
38+
cd producer_build
39+
npm install
40+
cd ..
41+
42+
cd ../src
43+
echo "Running npm build..."
44+
npm run build
45+
46+
echo "Preparing target_zip directory..."
47+
rm -rf ../target_zip
48+
cp -r ../target ../target_zip
49+
50+
cd ../target_zip
51+
52+
rm -f .DS_Store
53+
54+
echo "Creating consumer_build zip package..."
55+
cd consumer_build;
56+
zip -r ../BlockBlobReaderConsumer.zip ./* ;
57+
cd ..;
58+
59+
echo "Creating dlqprocessor_build zip package..."
60+
cd dlqprocessor_build;
61+
zip -r ../BlockBlobReaderDLQProcessor.zip ./* ;
62+
cd ..;
63+
64+
echo "Creating producer_build zip package..."
65+
cd producer_build;
66+
zip -r ../BlockBlobReaderProducer.zip ./* ;
67+
cd ..;
68+
69+
- name: Upload BlockBlobReader artifacts
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: blockblobreader_${{ github.ref_name }}
73+
if-no-files-found: error
74+
path: ./BlockBlobReader/target_zip/*.zip
75+
1276
tagged-release:
1377
name: "Tagged Release"
1478
runs-on: ubuntu-latest
79+
needs: build-blockblobreader
1580
steps:
81+
- name: Download BlockBlobReader artifacts
82+
uses: actions/download-artifact@v4
83+
with:
84+
name: blockblobreader_${{ github.ref_name }}
1685
- uses: "marvinpinto/action-automatic-releases@latest"
1786
with:
1887
repo_token: ${{ secrets.GITHUB_TOKEN }}
1988
prerelease: false
89+
files: ./*.zip
90+

0 commit comments

Comments
 (0)