generated from sarioglu/svelte-tailwindcss-template
-
Notifications
You must be signed in to change notification settings - Fork 4
104 lines (88 loc) · 2.89 KB
/
stable-matrix.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: 🚀 Release build
on:
workflow_dispatch:
push:
tags:
- "v[12].[0-9]+.[0-9]+"
jobs:
profile-cloud-build:
runs-on: ubuntu-latest
steps:
- name: Checkout Profile Cloud repository
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.PROFILE_CLOUD_KEY }}
repository: intechstudio/profile-cloud
fetch-depth: 0
- name: Checkout latest tag
run: git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
- name: Create public env file
run: |
touch .env
echo PUBLIC_COMMIT_HASH=$(git log --format="%h" -n 1) >> .env
echo PUBLIC_APP_ENV=production >> .env
echo PUBLIC_GOOGLE_CLIENT_ID=${{ secrets.PUBLIC_GOOGLE_CLIENT_ID_PROD }} >> .env
echo PUBLIC_CREATION_DATE=$(git log --format="%cd" --date=format:'%Y-%m-%d' -1) >> .env
- name: Build profile cloud project
run: npm ci && npm run build
- name: Upload profile cloud folder
uses: actions/upload-artifact@v4
with:
name: profile-cloud
path: public/
retention-days: 1
matrix-build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
needs: profile-cloud-build
steps:
- uses: actions/checkout@v3
with:
ref: ""
submodules: true
- name: Set env
shell: bash
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "${{ env.RELEASE_VERSION }}"
- name: Setup NodeJs
uses: actions/setup-node@v3
with:
node-version: "18.16.1"
- name: Download profile cloud artifact
uses: actions/download-artifact@v4
with:
name: profile-cloud
path: profile-cloud/
- name: Install dependencies
run: npm i
- name: Build
run: npm run export
env:
# gh repo token
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# windows Code signing
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
# Apple ID
APPLE_ID: ${{secrets.APPLE_ID}}
APPLE_TEAM_ID: ${{secrets.APPLE_TEAM_ID}}
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}
# macOS Code signing
CSC_LINK: ${{ secrets.MAC_CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CSC_KEY_PASSWORD }}
- name: See directory
run: ls build/*.*
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.RELEASE_VERSION }}
name: Release ${{ env.RELEASE_VERSION }}
files: build/*.*
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}