| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- name: Release & Publish
- on:
- push:
- tags:
- - '*'
- env:
- FORCE_COLOR: 2
- NODE: 22
- jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - name: Clone repository
- uses: actions/checkout@v6
- with:
- persist-credentials: false
- - name: Set env
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- - name: Set up Node.js
- uses: actions/setup-node@v6
- with:
- node-version: "${{ env.NODE }}"
- cache: npm
- - name: Install npm dependencies
- run: npm ci
- - name: Build distribution files
- run: npm run production
- - name: Zip distribution files
- uses: montudor/action-zip@v1
- with:
- args: "zip -qq -r admin-lte-${{env.RELEASE_VERSION}}.zip dist"
- - name: Release
- uses: softprops/action-gh-release@v2
- if: startsWith(github.ref, 'refs/tags/')
- with:
- # Let GitHub auto-generate the release notes from PRs / commits
- # since the previous tag. Replaces the discontinued
- # endaft/action-changelog action.
- generate_release_notes: true
- files: |
- admin-lte-${{env.RELEASE_VERSION}}.zip
|