Skip to content

Commit

Permalink
[RELEASE] Include x86_64 build (#473)
Browse files Browse the repository at this point in the history
* [RELEASE] Include x86_64 build

* cleaning
  • Loading branch information
jmbannon authored Feb 24, 2023
1 parent 12c6471 commit 74ece6e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: master # Needed for correct commit count. TODO: define once using GH actions
ref: master

- name: Set version envs 1/3
- name: Set date and commit hash variables
run: |
echo "DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Set version envs 2/3
- name: Count number of commits on master on day, minus 1 to account for post-push
run: |
echo "DATE_COMMIT_COUNT=$(($(git rev-list --count master --since='${{ env.DATE }} 00:00:00')-1))" >> $GITHUB_ENV
- name: Set version envs 3/3
- name: Set pypi and local version values
run: |
echo "LOCAL_VERSION=${{ env.DATE }}+${{ env.COMMIT_HASH }}" >> $GITHUB_ENV
if [ ${{ env.DATE_COMMIT_COUNT }} -le "0" ]
Expand Down Expand Up @@ -85,7 +85,8 @@ jobs:
python3.10 -m ensurepip --upgrade
- name: Build Package
run: |
python3.10 -m pip install -e .[build]
python3.10 -m pip install -e .
python3.10 -m pip install pyinstaller
# Build executable
pyinstaller ytdl-sub.spec
mkdir -p /opt/builds
Expand Down Expand Up @@ -125,10 +126,13 @@ jobs:
name: ytdl-sub_x86_64
path: /opt/builds

- name: Rename x86_64 build
run: |
mv /opt/builds/ytdl-sub_x86_64 /opt/builds/ytdl-sub
- name: Inspect build directory, rename x86_64 build
run: |
ls -lh /opt/builds
mv /opt/builds/ytdl-sub_x86_64 /opt/builds/ytdl-sub
- name: Create Release
if: ${{ github.ref == 'refs/heads/master' }}
Expand All @@ -142,7 +146,7 @@ jobs:
draft: false
prerelease: false
files: |
/opt/builds/ytdl-sub_x86_64
/opt/builds/ytdl-sub
/opt/builds/ytdl-sub_aarch64
pypi-publish:
Expand Down

0 comments on commit 74ece6e

Please sign in to comment.