-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (32 loc) · 889 Bytes
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Create Release
permissions:
contents: write
on:
push:
branches:
- main # adjust to your default branch if different
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Zip module.js
run: |
zip module.zip module.json
- name: Extract version from module.json
id: get_version
run: |
VERSION=$(jq -r ".version" module.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "::set-output name=version::$VERSION"
- name: Create Release and Upload Asset
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.VERSION }}
name: Release ${{ env.VERSION }}
allowUpdates: true
artifacts: "module.json, ./module.zip"
draft: false
prerelease: false