Initial Commit #15
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
# .github/workflows/release.yml | |
name: Release | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: write | |
jobs: | |
build-release: | |
name: Build artifacts | |
runs-on: ubuntu-latest | |
container: | |
image: docker.io/batonogov/pyinstaller-linux:latest | |
env: | |
SS_DEV_ID: ${{ secrets.SS_DEV_ID }} | |
SS_DEV_PASSWORD: ${{ secrets.SS_DEV_PASSWORD }} | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Build package | |
run: | | |
echo "Creating Linux artifact" | |
apt-get update && apt-get install -y zip | |
pip install -r ./requirements.txt | |
pyinstaller --onefile ./src/app.py | |
zip -r Artie.zip ./src/dist/app assets ./config.json ./launch.sh | |
cp Artie.zip ./src/Artie.zip | |
publish-release: | |
name: Publish Artie.zip | |
runs-on: ubuntu-latest | |
needs: build-release | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Upload Artie.zip | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Artie | |
path: ./src/Artie.zip | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: ./src/Artie.zip | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} |