Skip to content

Build dist files and release #7

Build dist files and release

Build dist files and release #7

Workflow file for this run

name: Build dist files and release
on:
workflow_dispatch:
inputs:
version:
type: string
description: Version for new release
required: true
default: 0.0.0
jobs:
build:
name: Build dist files and release
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: "20.11.1"
- name: Install dependencies
run: npm clean-install
- name: Install ncc
run: npm --location=global install @vercel/ncc
- name: Generate unified release files with ncc
run: |
ncc build src/terraform.js -o dist/terraform -m
ncc build src/wrapper.js -o dist/wrapper -m
- name: Add dist-files to last commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Action"
git add dist/*
git update-index --chmod=+x dist/wrapper/index.js
git commit -m "Auto-build dist files" --allow-empty
git push -f
- name: Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ github.event.inputs.version }} --generate-notes