File: release.yml

package info (click to toggle)
laniakea 0.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 15,464 kB
  • sloc: javascript: 38,493; python: 21,153; sh: 196; makefile: 129; ansic: 3
file content (60 lines) | stat: -rw-r--r-- 1,567 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Release

on:
  push:
    tags:
      - 'v*'

permissions:
  contents: write

jobs:
  build-test:
    name: Build & Test
    uses: ./.github/workflows/build-test.yml

  release:
    name: Create Release
    needs: build-test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Derive version string
        id: version
        run: |
          VERSION="${GITHUB_REF#refs/tags/v}"
          echo "version=$VERSION" >> "$GITHUB_OUTPUT"

      - name: Download build artifacts
        uses: actions/download-artifact@v6
        with:
          path: artifacts

      - name: Prepare source tarball
        run: |
          VERSION="${{ steps.version.outputs.version }}"
          mkdir -p release_assets
          set -x

          # Create source tarball for offline installs, with embedded NPM stuff
          git clone --depth 1 --branch "v${VERSION}" "https://github.com/${GITHUB_REPOSITORY}.git" "laniakea-${VERSION}"

          cd "laniakea-${VERSION}"
          python3 ./vendor/update-static.py stage
          rm -r ./vendor/node_modules
          rm -rf ./.git
          cd ..
          tar -cJf "release_assets/laniakea-${VERSION}_fullsrc.tar.xz" "laniakea-${VERSION}"

          echo "Assets to upload:"
          ls -la release_assets/

      - name: Create GitHub Release
        uses: softprops/action-gh-release@v2
        with:
          name: Version ${{ steps.version.outputs.version }}
          generate_release_notes: true
          draft: false
          prerelease: false
          files: release_assets/*