From 15017d5570a508e1ef9368618e2cd8f0abacd16a Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sun, 15 Jan 2023 22:10:13 -0500 Subject: [PATCH] Add release workflow to publish UI artifacts Signed-off-by: Yuri Shkuro --- .github/workflows/release.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..d77b70dc3b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Publish release + +on: + release: + types: + - published + +# See https://github.com/jaegertracing/jaeger/issues/4017 +# and https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: + deployments: write + contents: write + +jobs: + publish-release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + cache: yarn + node-version: '16' + - run: yarn install --frozen-lockfile + - run: yarn lint + - run: yarn build + id: yarn-build + + - name: Package artifacts + id: package-artifacts + run: tar -czvf ./assets.tar.gz --strip-components=3 packages/jaeger-ui/build/ + if: steps.yarn-build.outcome == 'success' + + - name: Upload artifacts + uses: svenstaro/upload-release-action@2728235f7dc9ff598bd86ce3c274b74f802d2208 + with: + file: 'assets.tar.gz' + overwrite: true + tag: ${{ github.ref }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + if: steps.package-artifacts.outcome == 'success'