summaryrefslogtreecommitdiff
path: root/mut/dmenu-mac/.github/workflows/main.yml
blob: 2164189c7cebc9fc3a5139dec84973a95d10fb2e (plain)
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
name: Build

on: [push]

jobs:
  build:
    runs-on: macos-12

    steps:
    - uses: actions/checkout@v1

    - name: Lint
      run: swiftlint --strict

    - name: Build
      run: xcodebuild
        -scheme dmenu-mac
        -archivePath dmenu-mac.xcarchive archive

    - name: Package
      run: xcodebuild
        -exportArchive
        -archivePath dmenu-mac.xcarchive
        -exportOptionsPlist mac-application-archive.plist
        -exportPath .

    - name: Compress
      run: zip -r dmenu-mac.zip dmenu-mac.app

    - uses: actions/upload-artifact@v1
      with:
        name: dmenu-mac.zip
        path: dmenu-mac.zip

    - name: Release
      if: startsWith(github.ref, 'refs/tags/')
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        GITHUB_USER: "user"
      run: hub release edit ${GITHUB_REF//refs\/tags\//} -a dmenu-mac.zip -m ''