Skip to content

Commit 131319d

Browse files
fix(.github): only deploy on github release (#91)
* fix(.github): try fixing github action deploy * build 1.2.2 [skip ci] * fix(.github): deploy only on release * chore: add a release
1 parent 6061b6b commit 131319d

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name: Deploy
22

33
on:
4-
push:
5-
branches:
6-
- prod
4+
release:
5+
types:
6+
- created
77

88
env:
99
# Specific name is required to login: https://code.visualstudio.com/api/working-with-extensions/continuous-integration
1010
VSCE_PAT: ${{ secrets.VSCE_PAT }}
1111

1212
jobs:
1313
build:
14-
if: ${{ contains(github.event.head_commit.message, 'patch') || contains(github.event.head_commit.message, 'minor') || contains(github.event.head_commit.message, 'major') }}
15-
name: Build and Publish Extension
14+
if: startsWith( github.ref, 'refs/tags/releases/')
15+
name: Publish Extension from Release
1616
runs-on: ubuntu-20.04
1717

1818
steps:
@@ -23,14 +23,5 @@ jobs:
2323
with:
2424
node-version: 16.x
2525

26-
- name: Install Dependencies
27-
run: npm install
28-
- name: Git Config
29-
run: |
30-
git config --global user.email "${{ secrets.GIT_AUTHOR_EMAIL }}"
31-
git config --global user.name "${{ secrets.GIT_AUTHOR_NAME }}"
32-
- name: Build Extension
33-
run: npm run pack -- ${{ (contains(github.event.head_commit.message, 'patch') && 'patch') || (contains(github.event.head_commit.message, 'minor') && 'minor') || (contains(github.event.head_commit.message, 'major') && 'major') }} -m "build %s [skip ci]"
34-
3526
- name: Publish
3627
run: npm run deploy

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
dist
2+
dist
3+
.act.json

freecodecamp-courses-patch.vsix

229 Bytes
Binary file not shown.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "freecodecamp-courses",
33
"displayName": "freeCodeCamp - Courses",
44
"description": "Provides tooling for quick and easy selection of courses offered by freeCodeCamp",
5-
"version": "1.2.1",
5+
"version": "1.2.2",
66
"author": "freeCodeCamp",
77
"publisher": "freeCodeCamp",
88
"galleryBanner": {

0 commit comments

Comments
 (0)