Skip to content

Commit 7d64e22

Browse files
committed
Add automated plugin publishing.
1 parent 7fefd4b commit 7d64e22

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@ jobs:
77
publish:
88
runs-on: ubuntu-latest
99
steps:
10+
- name: Get tag version
11+
id: get_tag_version
12+
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
13+
14+
# PLUGIN PUBLISH
15+
- name: Checkout plugins repo
16+
uses: actions/checkout@v2
17+
with:
18+
repository: dprint/plugins
19+
token: ${{ secrets.CI_REPO_PAT }} # github.token is scoped to current repo, so use this to push to other repo
20+
path: dprint-plugins
21+
- name: Plugin publish
22+
run: |
23+
cd dprint-plugins
24+
curl -L https://github.com/dprint/dprint-plugin-typescript/releases/download/${{ steps.get_tag_version.outputs.TAG_VERSION }}/typescript-${{ steps.get_tag_version.outputs.TAG_VERSION }}.wasm \
25+
--output typescript-${{ steps.get_tag_version.outputs.TAG_VERSION }}.wasm
26+
node scripts/replace-plugin.js dprint-plugin-typescript ${{ steps.get_tag_version.outputs.TAG_VERSION }} typescript-${{ steps.get_tag_version.outputs.TAG_VERSION }}
27+
git add .
28+
git config user.name "David Sherret"
29+
git config user.email "[email protected]"
30+
git commit -m "dprint-plugin-typescript ${{ steps.get_tag_version.outputs.TAG_VERSION }}"
31+
git push origin master
32+
1033
# CARGO PUBLISH
1134
- name: Checkout
1235
uses: actions/checkout@v2

0 commit comments

Comments
 (0)