forked from Clipy/Clipy
-
Notifications
You must be signed in to change notification settings - Fork 17
79 lines (77 loc) · 2.5 KB
/
swift.yml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Swift
on: [push]
jobs:
build:
environment: Sparkle Updates
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Show Xcode Version
run: xcode-select -v
- uses: actions/cache@v2
with:
path: |
.build
SourcePackages
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Download dependencies
run: xcodebuild -resolvePackageDependencies -workspace Clipy.xcworkspace -scheme Clipy -configuration Release -clonedSourcePackagesDirPath SourcePackages
- name: Use release tag as version
if: startsWith(github.ref, 'refs/tags')
run: bash .travis/release-a-version.sh
- name: Setup certificates
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- name: Build
run: bash .travis/build.sh
env:
CS_ID: "Apple Development"
CS_TEAM: "V299WZCD66"
- name: Prepare Delta
run: bash .travis/prepare_delta.sh
- name: Sparkle
env:
SPARKLE_ED25519_KEY: ${{ secrets.SPARKLE_ED25519_KEY }}
run: bash .travis/sparkle_keys.sh
- name: Show appcast.xml
run: cat appcast.xml
- name: Create Release
if: startsWith(github.ref, 'refs/tags')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Assets
uses: alexellis/upload-assets@0.2.3
if: startsWith(github.ref, 'refs/tags')
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["Clipy.app.zip", "appcast.xml", ".tmp/*.delta"]'
test:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Show Xcode Version
run: xcode-select -v
- uses: actions/cache@v2
with:
path: |
.build
SourcePackages
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Download dependencies
run: xcodebuild -resolvePackageDependencies -workspace Clipy.xcworkspace -scheme Clipy -configuration Release -clonedSourcePackagesDirPath SourcePackages
- name: Run tests
run: bash .travis/test.sh