-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (59 loc) · 2.04 KB
/
publish.yaml
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
on:
workflow_dispatch:
push:
tags:
- "*"
name: Publish Extension
jobs:
test:
uses: ./.github/workflows/main.yaml
publish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # 4.0.4
with:
node-version: 20.x
registry-url: "https://registry.npmjs.org"
scope: "@openfga"
always-auth: false
cache: "npm"
cache-dependency-path: ./package-lock.json
- run: npm ci
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@28e2d3f5817fccf23c1f219eb0cecc903132d1a2 # 1.6.2
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@28e2d3f5817fccf23c1f219eb0cecc903132d1a2 # 1.6.2
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com/
create-release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: publish
permissions:
contents: write
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 # v3.0.1
with:
version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: upload-artifact
name: Upload Artifact
uses: ./.github/actions/upload-artifact
- name: Upload Artifact to Release
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.upload-artifact.outputs.location }}
tag: ${{ github.ref }}
overwrite: true