-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature to upload JS source maps (#10)
This adds parameters to take source maps and minified url as input. Source maps can be up uploaded and downloaded as Github artifact.
- Loading branch information
Showing
6 changed files
with
109 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,8 @@ Optionally set `ROLLBAR_USERNAME` environment variable, usernames can be found a | |
| `environment` | `true` | | The environment where the deploy is being done. | | ||
| `version` | `true` | | The version being deployed. | | ||
| `status` | `false` | `succeeded` | The status of the deploy. | | ||
|
||
| `source_maps` | `false` | | JS source map files. | | ||
| `minified_urls`| `false` | | Minified URLs linked to source maps above | | ||
|
||
### Ouputs | ||
|
||
|
@@ -81,3 +82,41 @@ steps: | |
ROLLBAR_USERNAME: ${{ github.actor }} | ||
DEPLOY_ID: ${{ steps.rollbar_pre_deploy.outputs.deploy_id }} | ||
``` | ||
### Example with JS Source Map | ||
```yaml | ||
jobs: | ||
# This workflow builds source maps | ||
build: | ||
- uses: actions/checkout@v2 | ||
- name: npm run build | ||
run: npm run build --prefix templates/static/ | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: bundle.js.map | ||
path: public/bundle.js.map | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: bundle2.js.map | ||
path: public/bundle2.js.map | ||
# This workflow deploys source maps to Rollbar | ||
deploy: | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: bundle.js.map | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: bundle2.js.map | ||
- name: Rollbar deploy | ||
uses: rollbar/[email protected] | ||
with: | ||
environment: production | ||
version: ${{ github.sha }} | ||
status: succeeded | ||
source_maps: bundle.js.map bundle2.js.map | ||
minified_urls: https://www.example.com/public/bundle.js https://www.example.com/public/bundle2.js | ||
env: | ||
ROLLBAR_ACCESS_TOKEN: ${{ secrets.ROLLBAR_ACCESS_TOKEN }} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.