2323 echo "version=$VERSION" >> $GITHUB_OUTPUT
2424 echo "Extracted version: $VERSION"
2525
26- create-draft-release :
27- name : Create Draft Release
28- needs : [extract-version]
29- runs-on : ubuntu-latest
30- permissions :
31- contents : write
32- outputs :
33- release_id : ${{ steps.create_release.outputs.id }}
34-
35- steps :
36- - name : Checkout code
37- uses : actions/checkout@v4
38-
39- - name : Create Draft Release
40- id : create_release
41- uses : softprops/action-gh-release@v1
42- with :
43- name : NetDriver Simunet ${{ needs.extract-version.outputs.version }}
44- draft : true
45- prerelease : false
46- generate_release_notes : true
47- body : |
48- ## netdriver-simunet ${{ needs.extract-version.outputs.version }}
49-
50- ### 📦 Package
51-
52- **netdriver-simunet** - SSH server simulation for testing network device terminals
53-
54- ### 🛠️ Preparation
55-
56- ```bash
57- # Create directories
58- mkdir -p config/simunet logs
59-
60- # Download default configuration
61- curl -o config/simunet/simunet.yml https://raw.githubusercontent.com/${{ github.repository }}/master/config/simunet/simunet.yml
62- ```
63-
64- ### 📥 Installation
65-
66- **PyPI:**
67- ```bash
68- pip install netdriver-simunet==${{ needs.extract-version.outputs.version }}
69- ```
70-
71- **Docker:**
72- ```bash
73- # Pull the image
74- docker pull ghcr.io/opensecflow/netdriver-simunet:${{ needs.extract-version.outputs.version }}
75-
76- # Run with host network mode
77- docker run -d --network host \
78- -v $(pwd)/config:/app/config \
79- -v $(pwd)/logs:/app/logs \
80- ghcr.io/opensecflow/netdriver-simunet:${{ needs.extract-version.outputs.version }}
81- ```
82-
83- **Available tags:** `${{ needs.extract-version.outputs.version }}`, `latest`
84-
85- **Platforms:** `linux/amd64`, `linux/arm64`
86-
87- ### 📝 Changes
88-
89- See [CHANGELOG](https://github.com/OpenSecFlow/netdriver/blob/master/CHANGELOG.md) for detailed changes.
90-
9126 test :
9227 name : Run tests
9328 runs-on : ubuntu-latest
@@ -219,34 +154,76 @@ jobs:
219154 cache-to : type=gha,mode=max
220155 platforms : linux/amd64,linux/arm64
221156
222- upload-assets :
223- name : Upload Assets to Release
224- needs : [extract-version, create-draft-release, build-and-publish, build-docker-image]
157+ create-release :
158+ name : Create Release with Assets
159+ needs : [extract-version, build-and-publish, build-docker-image]
225160 runs-on : ubuntu-latest
226161 permissions :
227162 contents : write
228163
229164 steps :
165+ - name : Checkout code
166+ uses : actions/checkout@v4
167+
230168 - name : Download wheel artifact
231169 uses : actions/download-artifact@v4
232170 with :
233171 name : simunet-wheel
234172 path : ./dist
235173
236- - name : Upload wheel to release
174+ - name : Create Draft Release
175+ id : create_draft
237176 uses : softprops/action-gh-release@v1
238177 with :
239- tag_name : simunet-${{ needs.extract-version.outputs.version }}
178+ name : NetDriver Simunet ${{ needs.extract-version.outputs.version }}
179+ draft : true
180+ prerelease : false
181+ generate_release_notes : true
240182 files : ./dist/*.whl
183+ body : |
184+ ## netdriver-simunet ${{ needs.extract-version.outputs.version }}
241185
242- publish-release :
243- name : Publish Release
244- needs : [extract-version, create-draft-release, upload-assets]
245- runs-on : ubuntu-latest
246- permissions :
247- contents : write
186+ ### 📦 Package
187+
188+ **netdriver-simunet** - SSH server simulation for testing network device terminals
189+
190+ ### 🛠️ Preparation
191+
192+ ```bash
193+ # Create directories
194+ mkdir -p config/simunet logs
195+
196+ # Download default configuration
197+ curl -o config/simunet/simunet.yml https://raw.githubusercontent.com/${{ github.repository }}/master/config/simunet/simunet.yml
198+ ```
199+
200+ ### 📥 Installation
201+
202+ **PyPI:**
203+ ```bash
204+ pip install netdriver-simunet==${{ needs.extract-version.outputs.version }}
205+ ```
206+
207+ **Docker:**
208+ ```bash
209+ # Pull the image
210+ docker pull ghcr.io/opensecflow/netdriver-simunet:${{ needs.extract-version.outputs.version }}
211+
212+ # Run with host network mode
213+ docker run -d --network host \
214+ -v $(pwd)/config:/app/config \
215+ -v $(pwd)/logs:/app/logs \
216+ ghcr.io/opensecflow/netdriver-simunet:${{ needs.extract-version.outputs.version }}
217+ ```
218+
219+ **Available tags:** `${{ needs.extract-version.outputs.version }}`, `latest`
220+
221+ **Platforms:** `linux/amd64`, `linux/arm64`
222+
223+ ### 📝 Changes
224+
225+ See [CHANGELOG](https://github.com/OpenSecFlow/netdriver/blob/master/CHANGELOG.md) for detailed changes.
248226
249- steps :
250227 - name : Publish Release
251228 uses : actions/github-script@v7
252229 with :
@@ -272,7 +249,7 @@ jobs:
272249
273250 verify :
274251 name : Verify publication
275- needs : [extract-version, build-and-publish, build-docker-image, publish -release]
252+ needs : [extract-version, build-and-publish, build-docker-image, create -release]
276253 runs-on : ubuntu-latest
277254
278255 steps :
0 commit comments