From d366e775e02ef58a4e198f43d2d11aea66445ea8 Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Mon, 1 Apr 2024 12:13:59 +0200 Subject: [PATCH] feat: publish ui components and test component as part of the release related to https://github.com/containers/podman-desktop/issues/6560 Signed-off-by: Florent Benoit --- .github/workflows/release.yaml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c76d8a89026d1..693762d3b65d0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,5 +1,5 @@ # -# Copyright (C) 2022 Red Hat, Inc. +# Copyright (C) 2022-2024 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -241,6 +241,22 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20 + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT} + + - uses: actions/cache@v4 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Execute yarn + run: yarn --frozen-lockfile --network-timeout 180000 + - name: Set-up npmjs auth token run: printf "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}\n" >> ~/.npmrc @@ -249,3 +265,15 @@ jobs: echo "Using version ${{ needs.tag.outputs.desktopVersion }}" sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ needs.tag.outputs.desktopVersion }}\",#g" packages/extension-api/package.json cd packages/extension-api && yarn publish --tag latest --no-git-tag-version --new-version "${{ needs.tag.outputs.desktopVersion }}" --access public + + - name: Publish ui/svelte to npmjs + run: | + echo "Using version ${{ needs.tag.outputs.desktopVersion }}" + sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ needs.tag.outputs.desktopVersion }}\",#g" packages/ui/package.json + cd packages/ui && yarn build && yarn publish --tag next --no-git-tag-version --new-version "${{ needs.tag.outputs.desktopVersion }}" --access public + + - name: Publish tests-playwright to npmjs + run: | + echo "Using version ${{ needs.tag.outputs.desktopVersion }}" + sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ needs.tag.outputs.desktopVersion }}\",#g" tests/playwright/package.json + cd tests/playwright && yarn build && yarn publish --tag next --no-git-tag-version --new-version "${{ needs.tag.outputs.desktopVersion }}" --access public