Skip to content

Commit

Permalink
WIP: Upload release asset CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sauravhiremath committed Apr 30, 2020
1 parent 45cc8d1 commit 4e16779
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,21 @@ jobs:
with:
node-version: '12.x'
run: npm ci

- name: Run Test
run: npm test:prod

- name: Run Build
run: npm build

- name: Create project tar
run: npm pack

- name: Release upload
uses: softprops/action-gh-release@v1
with:
files: release/

# Publish release on push to master
release-master:
if: github.ref == 'refs/heads/master'
Expand All @@ -42,11 +54,20 @@ jobs:
uses: softprops/action-gh-release@v1
with:
files: release/**/*
tag_name: ${{steps.version_check.outputs.releaseVersion}}
tag_name: ${{ steps.version_check.outputs.releaseVersion }}
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.version_check.outputs.releaseVersion }}
asset_path: ./my-artifact.zip
asset_name: my-artifact.zip
asset_content_type: application/zip

release-staging:
if: github.ref == 'refs/heads/staging'
Expand All @@ -72,3 +93,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.version_check.outputs.releaseVersion }}
asset_path: ./juno-node-linux-v${releaseVersion}.zip
asset_name: juno-node-linux-v${releaseVersion}.zip
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Run npm test and lint
- name: Tests and linting
run: npm run test:prod

0 comments on commit 4e16779

Please sign in to comment.