Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit 6400c4a

Browse files
committed
ci: setup versioning and workflow bot
1 parent 4559968 commit 6400c4a

File tree

4 files changed

+47
-26
lines changed

4 files changed

+47
-26
lines changed

.github/workflows/create-release.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/pre-release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: automatic-release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
BOT_GH_TOKEN: ${{ secrets.BOT_GH_TOKEN }}
10+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
11+
12+
jobs:
13+
prerelease:
14+
if: endsWith(github.ref, '/master')
15+
name: Create prerelease
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Install Dependencies
20+
run: npm ci
21+
22+
- name: Bump version
23+
id: bump
24+
run: |
25+
npm version prepatch
26+
27+
- name: Setup GIT
28+
run: |
29+
git config --global user.email "[email protected]"
30+
git config --global user.name "GraphQL Bot"
31+
git remote add github "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git" || true
32+
33+
- name: VSCE Pre-Release Publish
34+
id: publish
35+
run: |
36+
/node_modules/.bin/vsce publish --pre-release
37+
38+
- name: Push to master
39+
run: |
40+
git push github HEAD:"${GITHUB_REF}"

.github/workflows/release-or-pr.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ jobs:
2323
with:
2424
node-version: 16.x
2525

26+
- name: Setup GIT
27+
run: |
28+
git config --global user.email "[email protected]"
29+
git config --global user.name "GraphQL Bot"
30+
git remote add origin "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git" || true
31+
2632
- name: Install Dependencies
2733
run: npm ci
2834

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
"env:source": "export $(cat .envrc | xargs)",
218218
"vsce:publish": "vsce publish",
219219
"open-vsx:publish": "ovsx publish -p \"$OPEN_VSX_ACCESS_TOKEN\"",
220-
"publish": "vsce:publush && open-vsx:publish",
220+
"publish": "vsce:publish && open-vsx:publish",
221221
"upgrade-interactive": "npx npm-check -u"
222222
},
223223
"devDependencies": {

0 commit comments

Comments
 (0)