Skip to content

Add release steps thingy #23

Add release steps thingy

Add release steps thingy #23

Workflow file for this run

on:
push:
branches:
- main
tags:
- v*
pull_request:
jobs:
verify:
name: Verify files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
- name: Test Tailwind
working-directory: test
run: |
npm install
npm run lint
npm run build
- name: Package application
if: startsWith(github.ref, 'refs/tags/v')
run: |
# Load version from Git
npm version --allow-same-version --no-git-tag-version from-git
# Set as env
export NODE_PKG_VERSION=$( jq -r '.version' package.json )
echo "NODE_PKG_VERSION=${NODE_PKG_VERSION}" >> $GITHUB_ENV
# Build and package
npm pack
mv *.tgz gumbo-millennium-eslint-config.tgz
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
name: Version ${{ env.NODE_PKG_VERSION }}
files: gumbo-millennium-eslint-config.tgz
generate_release_notes: true
body: |
This package contains the configuration for the Gumbo Millennium ESLint rules version ${{ env.NODE_PKG_VERSION }}.
To install this in your project, add the following to your `package.json`
```bash
"devDependencies": {
"@${{ github.repository }}": "${{ github.server_url }}/${{ github.repository }}/releases/download/v${{ env.NODE_PKG_VERSION }}/gumbo-millennium-eslint-config.tgz"
}
```
---