-
-
Notifications
You must be signed in to change notification settings - Fork 259
79 lines (64 loc) · 2.4 KB
/
hackathon-create-test-image.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
# Temporary workflow to create images for the hackathon on any branch named
# hackathon/*
name: Hackathon - Create Test Image
on:
push:
branches:
- hackathon/*
jobs:
build:
environment: plugin-development
strategy:
fail-fast: true
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Gather environment data
run: |
node --version
npm --version
yarn --version
- name: Configure Git user
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Yarn Setup
run: yarn setup
- name: Set Up Yarn Local Registry
run: yarn config set registry http://localhost:4873
- name: Set Up NPM Local Registry
run: npm set registry http://localhost:4873/
- name: Set Environment Variables
run: |
echo "DENDRON_RELEASE_VERSION=`cat ./packages/plugin-core/package.json | jq ".version" -r | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}'`" >> $GITHUB_ENV
echo "GOOGLE_OAUTH_CLIENT_SECRET=${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}" >> $GITHUB_ENV
echo "GOOGLE_OAUTH_CLIENT_ID=${{ secrets.GOOGLE_OAUTH_CLIENT_ID }}" >> $GITHUB_ENV
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> $GITHUB_ENV
echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Build the VSIX
run: |
yarn build:patch:local:ci
- name: Check for VSIX
run: |
vsixCount=`ls ./packages/plugin-core/*.vsix | wc -l | awk '{print $1}'`
if [ $vsixCount = 1 ]; then
vsix=$(ls ./packages/plugin-core/*.vsix | tail -1)
echo "found a single .vsix file named $vsix"
echo "VSIX_FILE_NAME=$(basename $vsix)" >> $GITHUB_ENV
echo "VSIX_RELATIVE_PATH=$vsix" >> $GITHUB_ENV
else
echo "error: expected 1 .vsix file, found $vsixCount"
exit 1
fi
- name: Upload VSIX Artifact
uses: actions/upload-artifact@v2
with:
name: vsix
path: ${{ env.VSIX_RELATIVE_PATH }}
if-no-files-found: error