Skip to content

Commit

Permalink
fix: make action standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbyg603 committed Feb 27, 2024
1 parent 3fe5f66 commit 91d7269
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/actions/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test My GitHub Action

on:
pull_request:
branches: [ main ]

jobs:
test-my-action:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Symbols 📦
uses: action.yaml
with:
clientId: "${{ secrets.SYMBOL_UPLOAD_CLIENT_ID }}"
clientSecret: "${{ secrets.SYMBOL_UPLOAD_CLIENT_SECRET }}"
database: "${{ secrets.BUGSPLAT_DATABASE }}"
application: "symbol-upload-test"
version: "1.0"
directory: "dist"
files: "**/*.js.map"
node-version: '21'
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ You can use the `symbol-upload` action in your [GitHub Actions](https://github.c
with:
clientId: "${{ secrets.SYMBOL_UPLOAD_CLIENT_ID }}"
clientSecret: "${{ secrets.SYMBOL_UPLOAD_CLIENT_SECRET }}"
database:"${{ secrets.BUGSPLAT_DATABASE }}"
database: "${{ secrets.BUGSPLAT_DATABASE }}"
application: "your-application"
version: "your-version"
files: "**/*.{pdb,exe,dll}"
directory: "your-build-directory"
node-version: "20"
```
Be sure to use [secrets](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) so that you don't expose the values for `clientId`, `clientSecret`, and `database`.
Expand Down
10 changes: 10 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,20 @@ inputs:
description: "Base directory for files"
type: string
required: false
node-version:
description: "Node.js version to use"
type: string
required: false
default: '20'

runs:
using: composite
steps:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}

- name: Install symbol-upload
shell: bash
run: npm i -g @bugsplat/symbol-upload
Expand Down

0 comments on commit 91d7269

Please sign in to comment.