Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit 030e72c

Browse files
authored
ci(plugin): fix build-plugin workflow (#447)
1 parent 0509a25 commit 030e72c

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Diff for: .github/workflows/build-plugin.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -47,33 +47,35 @@ jobs:
4747
- name: Test
4848
run: yarn test
4949
- name: Build
50-
run: yarn build
50+
run: yarn build:plugin
51+
- name: Pack
52+
run: mv dist/plugin dist/plateau-plugin && zip -r dist/plateau-plugin.zip dist/plateau-plugin
5153
- name: Save artifacts
5254
uses: actions/upload-artifact@v2
5355
if: github.ref == 'refs/heads/main'
5456
with:
5557
name: plateau-plugin
56-
path: plugin/dist/plugin
58+
path: plugin/dist/plateau-plugin.zip
5759

5860
release-nightly:
5961
name: Release nightly/rc
6062
runs-on: ubuntu-latest
6163
needs: [ci-plugin]
6264
if: ${{ github.event.inputs.name != 'blank' }}
6365
env:
64-
ARTIFACT: plateau-plugin_${{ github.event.inputs.name }}
66+
ARTIFACT: plateau-plugin_${{ github.event.inputs.name }}.zip
6567
steps:
6668
- uses: actions/download-artifact@v2
6769
with:
6870
name: plateau-plugin
6971
- name: Rename artifact
70-
run: mv plateau-plugin $ARTIFACT
72+
run: mv plateau-plugin.zip $ARTIFACT
7173
- name: Release
7274
uses: ncipollo/release-action@v1
7375
with:
7476
allowUpdates: true
7577
artifacts: ${{ env.ARTIFACT }}
76-
artifactContentType: application/gzip
78+
artifactContentType: application/zip
7779
commit: ${{ github.event.inputs.sha }}
7880
name: ${{ github.event.inputs.name }}
7981
tag: ${{ github.event.inputs.name }}
@@ -91,10 +93,10 @@ jobs:
9193
uses: dsaltares/fetch-gh-release-asset@master
9294
with:
9395
version: tags/rc
94-
file: plateau-plugin_rc
96+
file: plateau-plugin_rc.zip
9597
token: ${{ secrets.GITHUB_TOKEN }}
9698
- name: Rename artifact
97-
run: mv plateau-plugin_rc $ARTIFACT
99+
run: mv plateau-plugin_rc.zip $ARTIFACT
98100
- name: Download latest changelog
99101
uses: dawidd6/action-download-artifact@v2
100102
with:
@@ -105,7 +107,7 @@ jobs:
105107
with:
106108
allowUpdates: true
107109
artifacts: ${{ env.ARTIFACT }}
108-
artifactContentType: application/gzip
110+
artifactContentType: application/zip
109111
commit: ${{ github.event.inputs.sha }}
110112
name: ${{ github.event.inputs.new_tag }}
111113
tag: ${{ github.event.inputs.new_tag }}

Diff for: plugin/zip.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Yml from "yml";
77
const root = path.resolve("./");
88

99
const pluginInfo = Yml.load(`${root}/public/reearth.yml`);
10-
const filename = `${pluginInfo.id}-${pluginInfo.version}.zip`;
10+
const filename = `${pluginInfo.id}.zip`;
1111

1212
const output = fs.createWriteStream(`${root}/dist/${filename}`);
1313
const archive = archiver("zip", { zlib: { level: 9 } });

0 commit comments

Comments
 (0)