File: package-release.yml

package info (click to toggle)
wlmaker 0.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,696 kB
  • sloc: ansic: 58,587; xml: 1,424; python: 1,400; cpp: 253; yacc: 118; sh: 73; lex: 70; makefile: 8
file content (44 lines) | stat: -rw-r--r-- 1,493 bytes parent folder | download | duplicates (3)
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
name: Create source package for release
# Needing this, because wlmaker uses submodules, and github source package
# creation will not include submodules -- and cannot be tuned for that.
# See: https://github.com/phkaeser/wlmaker/issues/133

on:
  push:
    branches:
      - main
    tags:
      - v*
  release:
    types:
      - published

jobs:
  release:
    name: Create Release
    if: startsWith(github.ref, 'refs/tags/')
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code, including required submodules.
        uses: actions/checkout@v3
        with:
          # Not using 'recursive' prevents fetching extra submodules below
          # dependencies/. These are only needed to build wlroots from source.
          submodules: true

      - name: Create source package.
        run: |
            export WLM_VERSION="$(echo "${{ github.ref }}" | sed "s/^refs\/tags\/v//")"
            # Setup folder with package name, for apprropriate unpacking.
            rm -rf "/tmp/wlmaker-${WLM_VERSION}"
            cp -a "${PWD}" "/tmp/wlmaker-${WLM_VERSION}"
            mv "/tmp/wlmaker-${WLM_VERSION}" .
            tar -zcvf "wlmaker-${WLM_VERSION}.tar.gz" "wlmaker-${WLM_VERSION}"
            echo "WLM_ARCHIVE=wlmaker-${WLM_VERSION}.tar.gz" >> "${GITHUB_ENV}"
            echo "Created source archive wlmaker-${WLM_VERSION}.tar.gz."

      - name: Upload source package.
        uses: softprops/action-gh-release@v1
        with:
          files: ${{env.WLM_ARCHIVE}}