https://github.com/isfakeaccount/devvit-upload-github-action
  
  
    Github action to upload your Devvit apps 
    https://github.com/isfakeaccount/devvit-upload-github-action
  
        Last synced: 14 days ago 
        JSON representation
    
Github action to upload your Devvit apps
- Host: GitHub
- URL: https://github.com/isfakeaccount/devvit-upload-github-action
- Owner: isFakeAccount
- License: mit
- Created: 2023-07-22T18:03:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-06T06:43:38.000Z (over 1 year ago)
- Last Synced: 2025-02-02T03:37:34.600Z (9 months ago)
- Language: Python
- Size: 36.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- 
            Metadata Files:
            - Readme: README.md
- License: LICENSE
 
Awesome Lists containing this project
README
          # Devvit App Upload GitHub Action
The Devvit App Upload GitHub Action is a custom GitHub Action designed to streamline the process of uploading apps to the [Devvit](https://developers.reddit.com/) platform. 
## Inputs
- `refresh_token`: The refresh token associated with your Devvit account. You have to extract the refresh token manually. For Linux, the refresh token is saved in file `~/.devvit/token`. Copy the whole thing and insert it as Github Secret in your repository. 
- `GITHUB_TOKEN`: This is automaticaly created for you provided by GitHub to authenticate and authorize actions within a GitHub Actions workflow. This token is used to updated the `devvit.yaml` after devvit upload.
See the [Using encrypted secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) for more detail on adding secrets to your repository.
## Usage
To use the Devvit App Upload GitHub Action in your repository, you need to create or update a GitHub Actions workflow file (e.g., .github/workflows/devvit-upload.yml):
You can use the action on two types of events
### Upload on release
The version number will be based on the tag name which should be named like `vMajor.Minor.Patch` (e.g `v0.1.0`)
```yaml
name: Publish to Devvit
on:
  push:
    tags:
      - 'v[0-9]*.[0-9]*.[0-9]*'
jobs:
  push-to-devvit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Devvit Upload Github Action
        uses: isFakeAccount/devvit-upload-github-action@v0.0.12
        with:
          refresh_token: ${{ secrets.REFRESH_TOKEN }}
      - name: Commit & Push changes
        uses: actions-js/push@master
        with:
          branch: master
          github_token: ${{ secrets.GITHUB_TOKEN }}
          message: Bumping the app version number
```
### Upload on push
```yaml
name: Publish to Devvit
on:
  push:
    branches:
      - master
jobs:
  push-to-devvit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Devvit Upload Github Action
        uses: isFakeAccount/devvit-upload-github-action@v0.0.12
        with:
          refresh_token: ${{ secrets.REFRESH_TOKEN }}
          upload_args: "--bump=minor"
      - name: Commit & Push changes
        uses: actions-js/push@master
        with:
          branch: master
          github_token: ${{ secrets.GITHUB_TOKEN }}
          message: Bumping the app version number
```