Steam Community Auto-Post #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Steam Community Auto-Post | |
| # Запускается только при публикации нового релиза | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| post-to-steam: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| # Нужно для коммита обновлённого posted_versions.txt | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| pip install selenium | |
| - name: Install Chrome and ChromeDriver | |
| run: | | |
| # Установка Chrome | |
| wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
| sudo apt-get update | |
| sudo apt-get install -y google-chrome-stable | |
| # ChromeDriver устанавливается автоматически через selenium-manager | |
| - name: Run Steam Auto-Poster | |
| env: | |
| STEAM_LOGIN: ${{ secrets.STEAM_LOGIN }} | |
| STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} | |
| RELEASE_VERSION: ${{ github.event.release.tag_name }} | |
| run: | | |
| python steam_autopost.py | |
| - name: Commit updated posted_versions.txt | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add posted_versions.txt | |
| git diff --quiet && git diff --staged --quiet || git commit -m "chore: mark ${{ github.event.release.tag_name }} as posted to Steam" | |
| git push | |
| continue-on-error: true |