new release 🚀 #48
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
run-name: new release 🚀 | |
on: | |
push: | |
paths: | |
- '.github/ver.env' | |
name: Upload Release Asset | |
jobs: | |
build-and-release: | |
name: Package ABST on Windows | |
runs-on: windows-latest | |
steps: | |
- name: Set up Python x86 | |
uses: actions/setup-python@v4 | |
with: | |
# Semantic version range syntax or exact version of a Python version | |
python-version: '3.9' | |
# Optional - x64 or x86 architecture, defaults to x64 | |
architecture: 'x86' | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
shell: powershell | |
run: | | |
Set-PSRepository PSGallery -InstallationPolicy Trusted | |
Install-Module ps2exe | |
pip install PyQt5 pyqt5-tools pyinstaller | |
- name: version #add env var # This would actually build your project, using zip for an example artifact | |
shell: powershell | |
run: | | |
cat .github/ver.env >> $env:GITHUB_ENV | |
- name: prepare release archive | |
shell: powershell | |
run: | | |
$PSVersionTable | |
pip --version | |
Set-Alias -Name lrelease -value C:\hostedtoolcache\windows\Python\3.9.13\x86\lib\site-packages\qt5_applications\Qt\bin\lrelease.exe | |
./local_release.ps1 -opath ABST_${env:VER} | |
echo ${env:VER} | |
echo $VER | |
echo "############################################################---------------" | |
Compress-Archive -LiteralPath ABST_${env:VER} -DestinationPath ./ABST_${env:VER}.zip | |
ls | |
- name: create 7z release | |
shell: powershell | |
run: | | |
7z a -t7z -mx=9 ./ABST_${env:VER}.7z ./ABST_${env:VER}/ | |
# - name: Create Release | |
# id: create_release | |
# uses: actions/create-release@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# tag_name: ${{env.VER}} | |
# release_name: Release ${{env.VER}} | |
# draft: true | |
# prerelease: false | |
# - name: Upload Release Asset | |
# id: upload-release-asset | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
# asset_path: ./ABST_${{env.VER}}.zip | |
# asset_name: ABST_${{env.VER}}.zip | |
# asset_content_type: application/zip | |
# - name: Upload Release Asset 7z | |
# id: upload-release-asset-7z | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
# asset_path: ./ABST_${{env.VER}}.7z | |
# asset_name: ABST_${{env.VER}}.7z | |
# asset_content_type: application/octet-stream | |
- name: Release new | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Release ${{env.VER}} | |
tag_name: ${{env.VER}} | |
files: ABST_${{env.VER}}.7z |