Skip to content

Commit

Permalink
Add release steps thingy
Browse files Browse the repository at this point in the history
  • Loading branch information
roelofr committed Nov 21, 2023
1 parent 47f9fb0 commit 199b648
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/verify-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ on:
push:
branches:
- main
tags:
- v*

pull_request:

jobs:
Expand Down Expand Up @@ -31,3 +34,37 @@ jobs:
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_owner }}/${{ github.repository }}": "${{ github.server_url }}/${{ github.repository_owner }}/${{ github.repository }}/releases/download/v${{ env.NODE_PKG_VERSION }}/gumbo-millennium-eslint-config.tgz"
}
```
---

0 comments on commit 199b648

Please sign in to comment.