Skip to content

Commit 03f937b

Browse files
authored
create release.
1 parent 5ec2dfc commit 03f937b

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

.github/workflows/docker-image.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build Alpine Node.js
22
permissions:
3-
contents: read
3+
contents: write
4+
45

56
on:
67
workflow_dispatch:
@@ -51,3 +52,33 @@ jobs:
5152
uname -a
5253
ldd ./bin/node
5354
name: Test node
55+
release:
56+
name: Create release for node.js ${{github.event.inputs.NodeVersion}}
57+
needs: [test]
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Download alpine node.js
61+
uses: actions/download-artifact@v2
62+
with:
63+
name: alpine_nodejs_${{github.event.inputs.NodeVersion}}
64+
# Create GitHub release
65+
- uses: actions/create-release@master
66+
id: createRelease
67+
name: Create node.js ${{github.event.inputs.NodeVersion}} Alpine Release
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
with:
71+
tag_name: "${{github.event.inputs.NodeVersion}}"
72+
release_name: "${{github.event.inputs.NodeVersion}}"
73+
body: |
74+
Alpine node.js ${{github.event.inputs.NodeVersion}}
75+
# Upload release assets
76+
- name: Upload Release Asset
77+
uses: actions/upload-release-asset@v1.0.1
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
with:
81+
upload_url: ${{ steps.createRelease.outputs.upload_url }}
82+
asset_path: ${{ github.workspace }}/node-${{github.event.inputs.NodeVersion}}-alpine-x64.tar.gz
83+
asset_name: node-${{github.event.inputs.NodeVersion}}-alpine-x64.tar.gz
84+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)