Merge pull request #2 from Nuku/patch-1 #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |