Skip to content

Commit e6ac7fa

Browse files
Fix github actions
1 parent 05f3b4a commit e6ac7fa

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- develop
1212

1313
jobs:
14-
build_redcode:
14+
build:
1515
strategy:
1616
matrix:
1717
os:
@@ -22,13 +22,17 @@ jobs:
2222
steps:
2323
- name: Checkout branch
2424
uses: actions/checkout@v2
25+
2526
- name: Install Node.js
2627
uses: actions/setup-node@v1
2728
with:
2829
node-version: 14.x
30+
2931
- name: Install dependencies
3032
run: npm install --locked
33+
3134
- name: Build extension
3235
run: npm run build
36+
3337
- name: Verify the build did not modify any files
3438
run: git diff --exit-code HEAD -- .

.github/workflows/publish.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,40 @@ on:
55
types:
66
- published
77

8-
defaults:
9-
run:
10-
working-directory: redcode
11-
128
env:
139
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1410

1511
jobs:
1612
publish:
17-
if: startsWith(github.ref, 'refs/tags/redcode-v')
1813
runs-on: ubuntu-latest
1914
steps:
2015
- name: Checkout
2116
uses: actions/checkout@v2
17+
2218
- name: Get Release
23-
id: get_release
24-
uses: bruceadams/[email protected]
25-
- name: Get release tag
26-
id: get_version
27-
run: echo "::set-output name=package::$(echo ${{ github.ref }} | cut -d '/' -f 3)"
19+
id: release
20+
uses: bruceadams/[email protected]
21+
2822
- name: Install Node.js
2923
uses: actions/setup-node@v1
3024
with:
31-
node-version: 10.x
25+
node-version: 14.x
26+
3227
- name: Install dependencies
3328
run: npm install --locked
29+
3430
- name: Package extension
35-
run: npm run package -- --out ${{ steps.get_version.outputs.package }}.vsix
31+
run: npm run package -- --out ${{ steps.release.outputs.tag_name }}.vsix
32+
3633
- name: Upload extension to Github
3734
uses: actions/upload-release-asset@v1
3835
with:
39-
upload_url: ${{ steps.get_release.outputs.upload_url }}
40-
asset_path: redcode/${{ steps.get_version.outputs.package }}.vsix
41-
asset_name: ${{ steps.get_version.outputs.package }}.vsix
36+
upload_url: ${{ steps.release.outputs.upload_url }}
37+
asset_path: ${{ steps.release.outputs.tag_name }}.vsix
38+
asset_name: ${{ steps.release.outputs.tag_name }}.vsix
4239
asset_content_type: application/vsix
40+
4341
- name: Publish extension to VSCode marketplace
44-
run: npm run deploy
42+
run: npm run publish
4543
env:
4644
VSCE_PAT: ${{ secrets.VSCE_PAT }}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
],
3535
"extensions": [
3636
".red",
37-
".redcode",
37+
".redcode"
3838
],
3939
"configuration": "./language-configuration.json"
4040
}
@@ -50,7 +50,7 @@
5050
"scripts": {
5151
"build": "npx js-yaml syntaxes/redcode.tmLanguage.yaml > syntaxes/redcode.tmLanguage.json",
5252
"package": "vsce package",
53-
"deploy": "vsce publish"
53+
"publish": "vsce publish"
5454
},
5555
"devDependencies": {
5656
"js-yaml": "^3.14.0",

0 commit comments

Comments
 (0)