Merge pull request #278 from hanzi/fix-southern-island-sra #28
Workflow file for this run
This file contains 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: Creates a new release when a tag is pushed | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
create-release-for-tag: | |
# This release action only really makes sense in the main repository and not in | |
# a fork, hence this condition. | |
if: github.repository == '40Cakes/pokebot-gen3' | |
name: "Create a release for the tag" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update version.py and remove unnecessary files | |
run: | | |
echo "pokebot_name = \"PokéBot Gen3\"" > modules/version.py | |
echo "pokebot_version = \"${{ github.ref_name }}\"" >> modules/version.py | |
rm -rf .git .github .gitattributes .gitignore pokebot.spec | |
mv LICENSE LICENSE.txt | |
- name: Create a ZIP file | |
run: | | |
zip -qq -r /tmp/pokebot-${{ github.ref_name }}.zip . | |
- name: Creates the GitHub release | |
uses: marvinpinto/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: false | |
automatic_release_tag: ${{ github.ref_name }} | |
files: | | |
/tmp/pokebot-${{ github.ref_name }}.zip |