diff --git a/.github/near-rewards.yml b/.github/near-rewards.yml new file mode 100644 index 0000000..16ed2b3 --- /dev/null +++ b/.github/near-rewards.yml @@ -0,0 +1,28 @@ +name: NEAR Protocol Rewards Tracking +on: + schedule: + - cron: '0 */12 * * *' # Every 12 hours + workflow_dispatch: # Manual trigger + push: + branches: [ main ] # Start on main branch updates + +jobs: + calculate-rewards: + runs-on: ubuntu-latest + permissions: + contents: read + issues: read + pull-requests: read + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Calculate Rewards + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPO: ${{ github.repository }} + run: | + npm install -g near-protocol-rewards@latest + near-protocol-rewards calculate \ No newline at end of file