Skip to content

Commit 61d1af0

Browse files
committed
Add macOS release step
1 parent 4aa1540 commit 61d1af0

File tree

8 files changed

+450
-435
lines changed

8 files changed

+450
-435
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
id: yarn-cache-dir-path
1212
run: echo "::set-output name=dir::$(yarn cache dir)"
1313
- uses: actions/cache@v1
14-
id: yarn-cache
1514
with:
1615
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
1716
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -21,7 +20,9 @@ jobs:
2120
- name: Run yarn fmt
2221
uses: ./ci/image
2322
with:
24-
args: yarn && yarn fmt
23+
args: yarn && yarn vscode && yarn fmt
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2526

2627
lint:
2728
runs-on: ubuntu-latest
@@ -32,7 +33,6 @@ jobs:
3233
id: yarn-cache-dir-path
3334
run: echo "::set-output name=dir::$(yarn cache dir)"
3435
- uses: actions/cache@v1
35-
id: yarn-cache
3636
with:
3737
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
3838
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -42,9 +42,33 @@ jobs:
4242
- name: Run yarn lint
4343
uses: ./ci/image
4444
with:
45-
args: yarn && yarn lint
45+
args: yarn && yarn vscode && yarn lint
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4648

47-
release-amd64:
49+
test:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v1
53+
54+
- name: Get yarn cache directory path
55+
id: yarn-cache-dir-path
56+
run: echo "::set-output name=dir::$(yarn cache dir)"
57+
- uses: actions/cache@v1
58+
with:
59+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
60+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
61+
restore-keys: |
62+
${{ runner.os }}-yarn-
63+
64+
- name: Run yarn test
65+
uses: ./ci/image
66+
with:
67+
args: yarn && yarn vscode && yarn test
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
71+
release-linux-amd64:
4872
runs-on: ubuntu-latest
4973
steps:
5074
- uses: actions/checkout@v1
@@ -53,7 +77,6 @@ jobs:
5377
id: yarn-cache-dir-path
5478
run: echo "::set-output name=dir::$(yarn cache dir)"
5579
- uses: actions/cache@v1
56-
id: yarn-cache
5780
with:
5881
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
5982
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -64,3 +87,25 @@ jobs:
6487
uses: ./ci/image
6588
with:
6689
args: yarn && yarn vscode && ./ci/release.sh
90+
env:
91+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
93+
release-macos:
94+
runs-on: macos-latest
95+
steps:
96+
- uses: actions/checkout@v1
97+
98+
- name: Get yarn cache directory path
99+
id: yarn-cache-dir-path
100+
run: echo "::set-output name=dir::$(yarn cache dir)"
101+
- uses: actions/cache@v1
102+
with:
103+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
104+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
105+
restore-keys: |
106+
${{ runner.os }}-yarn-
107+
108+
- name: Run release.sh
109+
run: yarn && yarn vscode && ./ci/release.sh
110+
env:
111+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

ci/fmt.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
set -euo pipefail
44

55
main() {
6-
if [[ ${CI-} ]]; then
7-
cd "$(dirname "$0")/.."
8-
./ci/vscode.sh
9-
fi
10-
116
shfmt -i 2 -w -s -sr $(git ls-files "*.sh")
127

138
local prettierExts

ci/image/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
FROM node:12-buster
1+
FROM node:12
22

33
RUN apt-get update && apt-get install -y \
44
libxkbfile-dev \
5+
libx11-dev \
56
libsecret-1-dev \
67
dumb-init
78

ci/lint.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
set -euo pipefail
44

55
main() {
6-
if [[ ${CI-} ]]; then
7-
cd "$(dirname "$0")/.."
8-
./ci/vscode.sh
9-
fi
10-
116
eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js")
127
stylelint --fix $(git ls-files "*.css")
138
tsc --noEmit

0 commit comments

Comments
 (0)