diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb9429b..9a920d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,13 @@ jobs: id-token: write # Necessary for generating the ID token for authentication steps: + - name: "Generate token" + id: generate_token + uses: tibdex/github-app-token@v1 + with: + app_id: ${{ secrets.BOT_APP_ID }} + private_key: ${{ secrets.BOT_PRIVATE_KEY }} + - name: Checkout code uses: actions/checkout@v3 @@ -32,15 +39,14 @@ jobs: - name: Set up GitHub Token run: | - echo "GITHUB_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }}" >> $GITHUB_ENV + echo "GITHUB_TOKEN=${{ steps.generate_token.outputs.token }}" >> $GITHUB_ENV - name: Run release run: npm run release # or 'bun run release' if you're using Bun env: - GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # Pass token for authentication - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} # Pass token for authentication - name: Push changes run: git push --follow-tags # Push the new release and tags back to the repository env: - GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # Pass token for authentication + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} # Pass token for authentication diff --git a/README.md b/README.md index 11dd42e..5063a9a 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@

StatStream Website Analytics Tool

+![Docker](https://img.shields.io/docker/pulls/priyanshudev/statstream?label=Docker%20Pulls&style=flat-square) +![Node.js](https://img.shields.io/badge/Node.js-%3E%3D%2020.x-brightgreen?style=flat-square) + ### ⭐ About StatStream is a web analytics tracking project designed to monitor and store website statistics using Discord for reporting. The goal of this project is to track essential website data, such as traffic and user interactions, and send that data to a Discord channel using a custom bot. @@ -18,7 +21,7 @@ StatStream is a web analytics tracking project designed to monitor and store web - [Node.js](https://nodejs.org/) (for the Discord bot backend) - [Discord bot](https://discord.com/developers/docs/intro) (with a bot token) - [Discord.js](https://discord.js.org/) (for Node.js Discord bot) - + ### Installation #### Step 1: Setting up the Discord Bot @@ -68,8 +71,6 @@ node main.js Once everything is set up, your Discord bot will begin reporting the tracked website statistics in real-time. You can extend the functionality by adding more events and analytics to track. - - ### Contributing Contributions are welcome! Please open an issue or submit a pull request with any improvements or bug fixes.