diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..106430c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release +on: + push: + branches: + - main + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Automatic GitHub Release + uses: justincy/github-action-npm-release@2.0.1 + id: release + - uses: actions/setup-node@v1 + if: steps.release.outputs.released == 'true' + with: + registry-url: 'https://registry.npmjs.org' + - name: Publish + if: steps.release.outputs.released == 'true' + run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/src/responses/resources/skyblock/election.d.ts b/src/responses/resources/skyblock/election.d.ts new file mode 100644 index 0000000..1e130b4 --- /dev/null +++ b/src/responses/resources/skyblock/election.d.ts @@ -0,0 +1,27 @@ +interface Candidate { + key: string + name: string + perks: { + name: string + description: string + }[] +} + +export interface SkyBlockElectionResponse { + success: true + lastUpdated: number + mayor: Candidate & { + election: { + year: number + candidates: (Candidate & { + votes: number + })[] + } + } + current?: { + year: number + candidates: (Candidate & { + votes: number + })[] + } +} \ No newline at end of file