Skip to content

Commit

Permalink
Fix release protection rules (#13)
Browse files Browse the repository at this point in the history
* fixes: release branch protection

* fixes: docker badges added
  • Loading branch information
priyanshuverma-dev authored Nov 18, 2024
1 parent c3585b7 commit 4cd550d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<h2>StatStream Website Analytics Tool</h2>
</div>

![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.
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 4cd550d

Please sign in to comment.