Skip to content

1.3.0

1.3.0 #32

Workflow file for this run

name: Release Creation
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install Dependencies
run: npm install
- name: Build with Webpack
run: npx webpack --config webpack.prod.js
- name: Extract tag version number
id: get_version
uses: battila7/get-version-action@v2
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: './module.json'
env:
version: ${{steps.get_version.outputs.version-without-v}}
url: https://github.com/${{github.repository}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip
- name: Prepare files for packaging
run: |
mkdir -p release/dist # Create a new directory structure
cp -r dist/* release/dist/
cp module.json release/ # Make sure this is the modified module.json
- name: Package files
run: |
cd release
zip -r ../module.zip . # Zip the contents of release, maintaining the new structure
- name: Update Release with Files
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
name: ${{ github.event.release.name }}
draft: ${{ github.event.release.unpublished }}
prerelease: ${{ github.event.release.prerelease }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './release/module.json, ./module.zip' # Ensure this points to the modified module.json
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}