From aead14b8a478a3fe23cd401a4575a1ed2c502b15 Mon Sep 17 00:00:00 2001 From: samshara Date: Tue, 5 Mar 2024 17:33:11 +0545 Subject: [PATCH 1/2] fix: update github workflow to wait for package availability in npm registry --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8b9467..75f1d0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,10 +47,10 @@ jobs: run: docker-compose up page-build - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: path: gh-pages/out - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ec5bbd..146b050 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,14 +91,26 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Wait for npm package to be available + run: | + PACKAGE_NAME="@ifrc-go/icons" + PACKAGE_VERSION=$(cat package.json | grep version | grep -oP "(\d+\.)?(\d+\.)?(\*|\d+)") + + # Loop until the package is available in the registry + while [[ -z $(npm show "$PACKAGE_NAME@$PACKAGE_VERSION" version) ]]; do + echo "Waiting for npm package to be available..." + sleep 20 # Adjust the interval as needed + done + echo "npm package is available!" + - name: Install + Build run: docker-compose up page-build - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: path: gh-pages/out - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 From b2cc3d1a5fcc40890dbdb8d07bf1d09c2f788c5e Mon Sep 17 00:00:00 2001 From: samshara Date: Tue, 5 Mar 2024 17:35:25 +0545 Subject: [PATCH 2/2] v1.3.2 --- .github/workflows/ci.yml | 32 -------------------------------- gh-pages/package.json | 2 +- package.json | 2 +- 3 files changed, 2 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75f1d0c..318ff6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,35 +22,3 @@ jobs: - name: Build run: yarn build - - deploy-page: - needs: build - runs-on: ubuntu-latest - - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - defaults: - run: - working-directory: gh-pages - - permissions: - contents: read - pages: write - id-token: write - - steps: - - uses: actions/checkout@v4 - - - name: Install + Build - run: docker-compose up page-build - - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: gh-pages/out - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/gh-pages/package.json b/gh-pages/package.json index a18be78..cdd9242 100644 --- a/gh-pages/package.json +++ b/gh-pages/package.json @@ -10,7 +10,7 @@ "lint": "next lint" }, "dependencies": { - "@ifrc-go/icons": "^1.3.1", + "@ifrc-go/icons": "^1.3.2", "@types/node": "20.2.5", "@types/react": "18.2.7", "@types/react-dom": "18.2.4", diff --git a/package.json b/package.json index 967202b..a42ea0a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ifrc-go/icons", - "version": "1.3.1", + "version": "1.3.2", "description": "IFRC-GO icons library for React.", "keywords": [ "ifrc-go",