Skip to content

Commit d93c9b9

Browse files
[AXON-29] chore: initial setup of Github CI
1 parent 23d3e04 commit d93c9b9

File tree

5 files changed

+501
-54
lines changed

5 files changed

+501
-54
lines changed

.github/workflows/build.yaml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20.x'
19+
20+
- name: Install dependencies
21+
run: npm install
22+
23+
# - name: Run linter
24+
# run: npm run lint
25+
26+
# - name: Run unit tests
27+
# run: npm run test
28+
29+
# - name: Build the extension
30+
# run: npm run extension:package
31+
32+
- name: Verify VSCE token
33+
run: |
34+
npx vsce verify-pat -p ${{ secrets.VSCE_MARKETPLACE_TOKEN }}
35+
36+
- name: Verify OpenVSX token
37+
run: |
38+
npx ovsx verify-pat -p ${{ secrets.OPENVSX_KEY }}

.github/workflows/release.yaml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20.x'
19+
20+
- name: Evaluate version
21+
run: |
22+
RELEASE_VERSION=${GITHUB_REF##*/v} && \
23+
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV && \
24+
echo "Using version '${RELEASE_VERSION}'"
25+
26+
- name: Set version
27+
run: npm -no-git-tag-version --allow-same-version -f version $RELEASE_VERSION
28+
29+
- name: Install dependencies
30+
run: npm install
31+
32+
- name: Run linter
33+
run: npm run lint
34+
35+
- name: Run unit tests
36+
run: npm run test
37+
38+
# - name: Build the extension
39+
# run: npm run extension:package
40+
41+
# keeping this two stubbed until we're ready to release
42+
# until then we might want to add tags without actually releasing
43+
# (e.g. to enable rollbacks down the line)
44+
# TODO after repo is public:
45+
# * change baseContentUrl across the repo
46+
# * remove `echo` stubs
47+
48+
- name: Publish the extension
49+
run: |
50+
npx vsce vefify-pat -p ${{ secrets.VSCE_MARKETPLACE_TOKEN }}
51+
# echo npx vsce publish \
52+
# -p ${{ secrets.VSCE_MARKETPLACE_TOKEN }} \
53+
# --baseContentUrl https://bitbucket.org/atlassianlabs/atlascode/src/main/ \
54+
# --packagePath atlascode-${GITHUB_REF##*/v}.vsix
55+
56+
- name: Publish to OpenVSX
57+
run: |
58+
npx ovsx vefify-pat -p ${{ secrets.OPENVSX_KEY }}
59+
# echo npx ovsx publish \
60+
# -p ${{ secrets.OPENVSX_KEY }} \
61+
# "atlascode-${GITHUB_REF##*/v}.vsix"
62+

bitbucket-pipelines.yml

-48
This file was deleted.

0 commit comments

Comments
 (0)