Skip to content
Snippets Groups Projects
patch.yml 4.12 KiB
name: Patch Release

on:
  workflow_dispatch:

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      # GET LATEST CODE
      - name: Checkout latest code
        uses: actions/checkout@master
        with:
          fetch-depth: 0

      # GENERATE CHANGELOG, TAG, RELEASE
      - id: conventional_changelog
        uses: ardalanamini/auto-changelog@master
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
      - id: compute_tag
        uses: craig-day/compute-tag@v13
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          version_scheme: semantic
          version_type: patch
          # MAJOR.MINOR.PATCH
      - name: Create Release
        id: create_release
        uses: actions/create-release@latest
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ steps.compute_tag.outputs.next_tag }}
          body: |
            Automatic release of version: **${{ steps.compute_tag.outputs.next_tag }}**
            **Changes in this release:**
            ${{ steps.conventional_changelog.outputs.changelog }}
          draft: false
          prerelease: false

      - name: Setup Node.js environment
        uses: actions/setup-node@v2.4.1
        with:
          # Version Spec of the version to use.  Examples: 12.x, 10.15.1, >=10.15.0
          node-version: '>= 16.9.1'
          # Set this option if you want the action to check for the latest available version that satisfies the version spec
          check-latest: false

      - name: Install Quasar
        run: npm install -g @quasar/cli

      - name: Install packages
        run: npm install

      - name: Build project
        run: quasar build

      - name: List files
        run: pwd && ls -al *

      - name: Create Build Archive tar.gz
        run: |
          echo "**** Creating archive of quasar build ****"
          tar -czf lttmm-${{ steps.compute_tag.outputs.next_tag }}.tar.gz dist/spa

      - name: Create Build Archive zip
        uses: papeloto/action-zip@v1
        with: