Skip to content

Commit 52d9ff1

Browse files
authored
Create release.yml
1 parent 675848e commit 52d9ff1

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
name: Upload Release Asset
3+
4+
on:
5+
push:
6+
branches: jg
7+
8+
jobs:
9+
build:
10+
name: Upload Release Asset
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
version: [ 1.1.6 ]
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
- name: Gzip
19+
run: |
20+
tar -jcvf jver-${{ matrix.version }}.tar.gz nativeplugins
21+
22+
- name: Create Release
23+
id: create_release
24+
uses: actions/create-release@v1
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
with:
28+
tag_name: ${{ matrix.version }}
29+
release_name: V ${{ matrix.version }}
30+
draft: false
31+
prerelease: false
32+
33+
- name: Upload Release Asset
34+
id: upload-release-asset
35+
uses: actions/upload-release-asset@v1
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
with:
39+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
40+
asset_path: ./jver-${{ matrix.version }}.tar.gz
41+
asset_name: jver-${{ matrix.version }}.tar.gz
42+
asset_content_type: application/zip

0 commit comments

Comments
 (0)