Skip to content

Commit 06c7d73

Browse files
authored
Merge pull request #53 from IFRCGo/fix/release-workflow
Fix/release workflow
2 parents 652652c + b2cc3d1 commit 06c7d73

File tree

4 files changed

+16
-36
lines changed

4 files changed

+16
-36
lines changed

.github/workflows/ci.yml

-32
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,3 @@ jobs:
2222

2323
- name: Build
2424
run: yarn build
25-
26-
deploy-page:
27-
needs: build
28-
runs-on: ubuntu-latest
29-
30-
environment:
31-
name: github-pages
32-
url: ${{ steps.deployment.outputs.page_url }}
33-
34-
defaults:
35-
run:
36-
working-directory: gh-pages
37-
38-
permissions:
39-
contents: read
40-
pages: write
41-
id-token: write
42-
43-
steps:
44-
- uses: actions/checkout@v4
45-
46-
- name: Install + Build
47-
run: docker-compose up page-build
48-
49-
- name: Upload artifact
50-
uses: actions/upload-pages-artifact@v1
51-
with:
52-
path: gh-pages/out
53-
54-
- name: Deploy to GitHub Pages
55-
id: deployment
56-
uses: actions/deploy-pages@v2

.github/workflows/release.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,26 @@ jobs:
9191
steps:
9292
- uses: actions/checkout@v4
9393

94+
- name: Wait for npm package to be available
95+
run: |
96+
PACKAGE_NAME="@ifrc-go/icons"
97+
PACKAGE_VERSION=$(cat package.json | grep version | grep -oP "(\d+\.)?(\d+\.)?(\*|\d+)")
98+
99+
# Loop until the package is available in the registry
100+
while [[ -z $(npm show "$PACKAGE_NAME@$PACKAGE_VERSION" version) ]]; do
101+
echo "Waiting for npm package to be available..."
102+
sleep 20 # Adjust the interval as needed
103+
done
104+
echo "npm package is available!"
105+
94106
- name: Install + Build
95107
run: docker-compose up page-build
96108

97109
- name: Upload artifact
98-
uses: actions/upload-pages-artifact@v1
110+
uses: actions/upload-pages-artifact@v3
99111
with:
100112
path: gh-pages/out
101113

102114
- name: Deploy to GitHub Pages
103115
id: deployment
104-
uses: actions/deploy-pages@v2
116+
uses: actions/deploy-pages@v4

gh-pages/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"lint": "next lint"
1111
},
1212
"dependencies": {
13-
"@ifrc-go/icons": "^1.3.1",
13+
"@ifrc-go/icons": "^1.3.2",
1414
"@types/node": "20.2.5",
1515
"@types/react": "18.2.7",
1616
"@types/react-dom": "18.2.4",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ifrc-go/icons",
3-
"version": "1.3.1",
3+
"version": "1.3.2",
44
"description": "IFRC-GO icons library for React.",
55
"keywords": [
66
"ifrc-go",

0 commit comments

Comments
 (0)