Skip to content

Add package version to release action #25

Add package version to release action

Add package version to release action #25

Workflow file for this run

name: Build and Release
on:
workflow_dispatch:
push:
tags:
- "v*"
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
cache: "yarn"
- name: Install Yarn
run: npm install -g yarn
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
- name: Get version from package
id: package_version
run: echo "::set-output name=VERSION::$(jq -r '.version' ./packages/core/package.json)"
shell: bash
- name: Copy File to Temp Location
run: cp ./packages/core/umd/production/ic-reactor-core.min.js ./temp-ic-reactor-core.min.js
- uses: actions/checkout@v3
- name: Release file
uses: djnicholson/release-action@v2.10
with:
token: ${{ secrets.RELEASE_TOKEN }}
release-name: Core Bundle ${{ steps.package_version.outputs.VERSION }}
tag-name: v${{ steps.package_version.outputs.VERSION }}
asset-name: "ic-reactor-core.min.js"
file: "./temp-ic-reactor-core.min.js"