generated from astahmer/tailwind-to-css-in-js
-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (117 loc) · 3.7 KB
/
extension.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Publish VSCode extension
on:
workflow_dispatch:
push:
paths:
- "packages/vscode/**"
- ".github/workflows/extension.yml"
branches:
- main
- fix/extension-publishing
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
create_timestamp:
if: github.event.pull_request.merged != true
runs-on: ubuntu-latest
outputs:
timestamp: ${{ steps.set_timestamp.outputs.timestamp }}
steps:
- name: Set Timestamp
id: set_timestamp
run: |
echo "::set-output name=timestamp::$(date +'%s')"
release-extension:
name: VSCode Marketplace
if: github.event.pull_request.merged != true
needs: create_timestamp
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: win32-x64
npm_config_arch: x64
- os: windows-latest
target: win32-ia32
npm_config_arch: ia32
- os: windows-latest
target: win32-arm64
npm_config_arch: arm
- os: ubuntu-latest
target: linux-x64
npm_config_arch: x64
- os: ubuntu-latest
target: linux-arm64
npm_config_arch: arm64
- os: ubuntu-latest
target: linux-armhf
npm_config_arch: arm
- os: ubuntu-latest
target: alpine-x64
npm_config_arch: x64
- os: macos-latest
target: darwin-x64
npm_config_arch: x64
- os: macos-latest
target: darwin-arm64
npm_config_arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/[email protected]
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
- name: Setup Git User
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "Alexandre Stahmer"
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build
- name: Set Environment Variable
run: echo "VSCE_RELEASE_VERSION=$(date +'%s')" >> $GITHUB_ENV
- name: Overrides esbuild
working-directory: ./packages/vscode
if: contains(matrix.target, 'darwin-arm64')
run: pnpm override-esbuild
- name: Rewrite workspace deps
working-directory: ./packages/vscode
run: pnpm rewrite-deps
- name: Clean node_modules on windows
working-directory: ./packages/vscode
if: contains(matrix.target, 'win')
run: pnpm clean:windows
- name: Clean node_modules
working-directory: ./packages/vscode
if: "!(contains(matrix.target, 'win'))"
run: pnpm clean
- name: Install with workspace-less
working-directory: ./packages/vscode
run: |
pnpm i --ignore-scripts --ignore-workspace --shamefully-hoist --force
env:
npm_config_arch: ${{ matrix.npm_config_arch }}
NODE_OPTIONS: "--max_old_space_size=4096"
- name: Publish RC
working-directory: ./packages/vscode
run: |
pnpm release
env:
VSCE_TOKEN: ${{secrets.VSCE_TOKEN}}
VSCE_RELEASE_VERSION: ${{ needs.create_timestamp.outputs.timestamp }}
VSCE_RELEASE_TYPE: rc
VSCE_TARGET: ${{ matrix.target }}