Skip to content

Commit

Permalink
chore: add artifact upload and comment on PR to build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
teebszet committed Jul 5, 2023
1 parent fd43395 commit fae45fc
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ name: Build

on:
pull_request:
branches: [ main, develop ]
branches: [main, develop]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js
- name: Use Node.js
uses: actions/setup-node@v3
with:
always-auth: true
Expand All @@ -25,4 +24,24 @@ jobs:
- name: Build
run: npm run build --if-present
# - name: Test
# run: npm test --passWithNoTests
# run: npm test --passWithNoTests
- name: Save Filename
id: save-filename
run: |
echo "FILENAME=xverse-extension.$(echo ${{github.ref_name}}| sed 's/\//-/').$(git rev-parse --short ${{ github.sha }}).zip" >> $GITHUB_OUTPUT
- name: Create Archive
run: |
zip -r build.zip ./build
- name: Upload Archive
uses: actions/upload-artifact@v3
with:
name: ${{ steps.save-filename.outputs.FILENAME }}
path: build.zip
if-no-files-found: error
- name: Comment to PR
uses: gavv/pull-request-artifacts@v1.0.0
with:
commit: ${{ github.event.pull_request.head.sha }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
artifacts: |
${{ steps.save-filename.outputs.FILENAME }}

0 comments on commit fae45fc

Please sign in to comment.