~zeal-developers/zeal/zeal

« back to all changes in this revision

Viewing changes to .github/workflows/release.yaml

  • Committer: Oleg Shparber
  • Date: 2023-09-20 05:23:44 UTC
  • Revision ID: git-v1:9f6c4deb3d7784660108cfbf2b97fc4c29bb4bc3
ci(github): add release workflow

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
name: Release
 
2
 
 
3
on:
 
4
  push:
 
5
    tags:
 
6
      - "v*.*.*"
 
7
 
 
8
# Required for creating GitHub release.
 
9
permissions:
 
10
  contents: write
 
11
 
 
12
concurrency:
 
13
  group: ${{ github.workflow }}-${{ github.ref }}
 
14
  cancel-in-progress: true
 
15
 
 
16
jobs:
 
17
  build-windows:
 
18
    name: ${{ matrix.config.name }}
 
19
    runs-on: ${{ matrix.config.os }}
 
20
    strategy:
 
21
      fail-fast: false
 
22
      matrix:
 
23
        config:
 
24
          - {
 
25
              name: "Windows Server 2022 / Qt 6",
 
26
              os: windows-2022,
 
27
              qt_modules: "qtwebengine qtwebchannel qtpositioning",
 
28
              qt_version: "6.5.2",
 
29
              configurePreset: ninja-multi-vcpkg,
 
30
              buildPreset: ninja-multi-vcpkg-release,
 
31
              buildSourcePackage: true
 
32
            }
 
33
          - {
 
34
              name: "Windows Server 2022 / Qt 6 / Portable",
 
35
              os: windows-2022,
 
36
              qt_modules: "qtwebengine qtwebchannel qtpositioning",
 
37
              qt_version: "6.5.2",
 
38
              configurePreset: ninja-multi-vcpkg-portable,
 
39
              buildPreset: ninja-multi-vcpkg-portable-release
 
40
            }
 
41
 
 
42
    env:
 
43
      VCPKG_DEFAULT_TRIPLET: x64-windows-release
 
44
      ZEAL_RELEASE_BUILD: ON
 
45
 
 
46
    steps:
 
47
      - name: Checkout
 
48
        uses: actions/checkout@v4
 
49
        with:
 
50
          fetch-depth: 0
 
51
 
 
52
      - name: Prepare vcpkg
 
53
        uses: lukka/run-vcpkg@v11
 
54
        with:
 
55
          vcpkgDirectory: ${{ runner.workspace }}/vcpkg
 
56
          vcpkgGitCommitId: 5b1214315250939257ef5d62ecdcbca18cf4fb1c # For vcpkg-tool 2023-03-29.
 
57
 
 
58
      - name: Install Qt
 
59
        uses: jurplel/install-qt-action@v3
 
60
        with:
 
61
          arch: win64_msvc2019_64
 
62
          modules: ${{ matrix.config.qt_modules }}
 
63
          version: ${{ matrix.config.qt_version }}
 
64
          cache: true
 
65
          extra: --external 7z
 
66
 
 
67
      - name: Configure & Build
 
68
        uses: lukka/run-cmake@v10
 
69
        with:
 
70
          configurePreset: ${{ matrix.config.configurePreset }}
 
71
          buildPreset: ${{ matrix.config.buildPreset }}
 
72
 
 
73
      - name: Retrieve Application Version
 
74
        run: |
 
75
          $zeal_version = Get-Content build/${{ matrix.config.configurePreset }}/zeal_version
 
76
          Write-Output "Zeal Version: $zeal_version"
 
77
          "ZEAL_VERSION=$zeal_version" >> $env:GITHUB_ENV
 
78
 
 
79
      - name: Package
 
80
        run: cmake --build build --preset ${{ matrix.config.buildPreset }} --target package
 
81
        env:
 
82
          CODESIGN_CERTIFICATE_BASE64: ${{ secrets.CODESIGN_CERTIFICATE_BASE64 }}
 
83
          CODESIGN_PASSWORD: ${{ secrets.CODESIGN_PASSWORD }}
 
84
 
 
85
      - name: Package Source
 
86
        if: matrix.config.buildSourcePackage
 
87
        run: cmake --build build --preset ${{ matrix.config.buildPreset }} --target package_source
 
88
 
 
89
      - name: Update GitHub Release
 
90
        uses: softprops/action-gh-release@v1
 
91
        with:
 
92
          draft: true
 
93
          # Only upload the following artifacts:
 
94
          # - Source packages.
 
95
          # - Non-portable MSI package.
 
96
          # - Portable 7-Zip and ZIP packages.
 
97
          files: |
 
98
            build/${{ matrix.config.configurePreset }}/zeal-${{ env.ZEAL_VERSION }}-portable-windows-x64.*
 
99
            build/${{ matrix.config.configurePreset }}/zeal-${{ env.ZEAL_VERSION }}-windows-x64.msi*
 
100
            build/${{ matrix.config.configurePreset }}/zeal-${{ env.ZEAL_VERSION }}.*
 
101
 
 
102
  build-appimage:
 
103
    name: AppImage
 
104
    runs-on: ubuntu-20.04
 
105
 
 
106
    steps:
 
107
      - name: Checkout
 
108
        uses: actions/checkout@v4
 
109
        with:
 
110
          fetch-depth: 0
 
111
 
 
112
      - name: Build AppImage
 
113
        uses: ./.github/workflows/appimage/
 
114
        with:
 
115
          recipe: pkg/appimage/appimage-amd64.yaml
 
116
          apt_dependencies: >-
 
117
            build-essential
 
118
            cmake extra-cmake-modules
 
119
            libappindicator-dev
 
120
            libarchive-dev
 
121
            libqt5x11extras5-dev
 
122
            libsqlite3-dev
 
123
            libxcb-keysyms1-dev
 
124
            ninja-build
 
125
            qtbase5-dev
 
126
            qtwebengine5-dev
 
127
 
 
128
      - name: Generate Digest Files
 
129
        run: for file in zeal-*.AppImage*; do sha256sum $file > $file.sha256; done
 
130
 
 
131
      - name: Update GitHub Release
 
132
        uses: softprops/action-gh-release@v1
 
133
        with:
 
134
          draft: true
 
135
          fail_on_unmatched_files: true
 
136
          files: |
 
137
            zeal-*.AppImage*