name: Host on: schedule: - cron: '50 */5 * * *' push: branches: - 'main' workflow_dispatch: jobs: host: runs-on: ubuntu-latest steps: - name: Use node uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - name: Get latest release uses: actions/github-script@v4 with: script: | const response = await github.repos.getLatestRelease({ owner: context.repo.owner, repo: context.repo.repo }); console.log(response.data.assets[0].browser_download_url); core.setOutput("download_url", response.data.assets[0].browser_download_url); - name: Download release assets run: | curl -L -o dist.zip ${{ steps.get-latest-release.outputs.download_url }} unzip dist.zip - name: Run index.cjs run: NODE_ENV=production DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} WARGAMING_APPLICATION_ID=${{ secrets.WARGAMING_APPLICATION_ID }} node --enable-source-maps dist/index.cjs