Skip to content

Commit

Permalink
Merge pull request #1922 from oasisprotocol/mz/ci
Browse files Browse the repository at this point in the history
Add extension build artifacts to workflows
  • Loading branch information
buberdds committed May 7, 2024
2 parents 8bc1739 + 952e927 commit 133b813
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions .changelog/1922.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add extension build artifacts to GitHub workflows
13 changes: 10 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,19 @@ jobs:
id: vars
run: |
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Build app
- name: Build web ROSE Wallet
run: yarn build
- name: Upload build artifacts
# Upload build artifacts on push event.
- name: Build extension ROSE Wallet
run: yarn build:ext
- name: Upload web ROSE Wallet build artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: rose-wallet-web-${{ steps.vars.outputs.SHORT_SHA }}
path: build
- name: Upload extension ROSE Wallet build artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: rose-wallet-ext-${{ steps.vars.outputs.SHORT_SHA }}
path: build-ext
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,25 @@ jobs:
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build app
- name: Build web ROSE Wallet
run: yarn build
- name: Build extension ROSE Wallet
run: yarn build:ext
- name: Set workflow variables
# Id is needed to access output in a next step.
id: vars
# We want to show version without the leading 'v'
# and use short SHA of the commit for file name.
run: |
echo "VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')" >> "$GITHUB_OUTPUT"
- name: Create zip file
- name: Create web ROSE Wallet zip file
run: |
cd build/
zip -r ../rose-wallet-web-${{ steps.vars.outputs.VERSION }}.zip .
- name: Create extension ROSE Wallet zip file
run: |
cd build-ext/
zip -r ../rose-wallet-ext-${{ steps.vars.outputs.VERSION }}.zip .
- name: Parse CHANGELOG.md file and extract changes for the given version
uses: buberdds/extract-changelog-action@v1
id: changelog
Expand All @@ -54,6 +60,7 @@ jobs:
with:
files: |
rose-wallet-web-${{ steps.vars.outputs.VERSION }}.zip
rose-wallet-ext-${{ steps.vars.outputs.VERSION }}.zip
build/Content-Security-Policy.txt
build/Permissions-Policy.txt
name: ROSE Wallet ${{ steps.vars.outputs.VERSION }}
Expand Down

0 comments on commit 133b813

Please sign in to comment.