Skip to content

Commit 55af3cd

Browse files
updated workflow files
1 parent 6abaff9 commit 55af3cd

6 files changed

+96
-24
lines changed

.github/workflows/build-aarch64-generic-jammy.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ jobs:
3232
- name: Clone the TensorFlow repository
3333
run: git clone https://github.com/tensorflow/tensorflow
3434

35-
- name: Checkout latest tag
35+
- name: Checkout latest version tag
36+
id: tf_tag
3637
working-directory: tensorflow
3738
run: |
3839
git fetch --tags
39-
latest_tag=$(git tag --sort=-creatordate | head -n 1)
40-
echo "Checking out tag: $latest_tag"
40+
latest_tag=$(git tag --sort=-creatordate | grep "^v" | head -n 1)
41+
echo "Using latest tag: $latest_tag"
42+
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
4143
git checkout "$latest_tag"
4244
4345
- name: Build the tensorflow lite library using Bazel
@@ -75,8 +77,18 @@ jobs:
7577
- name: Zip it up
7678
run: cd package && zip -r ../tensorflow_linux_generic_aarch64_jammy.zip * && cd ..
7779

80+
- name: Create GitHub release if it doesn't exist
81+
run: |
82+
gh release view "${{ steps.tf_tag.outputs.latest_tag }}" --repo $OWNER/TensorFlow_Lite_Compiled || \
83+
gh release create "${{ steps.tf_tag.outputs.latest_tag }}" \
84+
--repo $OWNER/TensorFlow_Lite_Compiled \
85+
--title "${{ steps.tf_tag.outputs.latest_tag }}" \
86+
--notes "Auto-generated release for TensorFlow Lite ${{ steps.tf_tag.outputs.latest_tag }}"
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89+
7890
- name: Upload Release Asset
7991
env:
8092
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8193
run:
82-
gh release upload $(gh release view --repo ${{ ENV.OWNER }}/TensorFlow_Lite_Compiled --json tagName --jq ".tagName") tensorflow_linux_generic_aarch64_jammy.zip
94+
gh release upload "${{ steps.tf_tag.outputs.latest_tag }}" tensorflow_linux_generic_aarch64_jammy.zip --repo $OWNER/TensorFlow_Lite_Compiled

.github/workflows/build-aarch64-generic-noble.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ jobs:
3030
- name: Clone the TensorFlow repository
3131
run: git clone https://github.com/tensorflow/tensorflow
3232

33-
- name: Checkout latest tag
33+
- name: Checkout latest version tag
34+
id: tf_tag
3435
working-directory: tensorflow
3536
run: |
3637
git fetch --tags
37-
latest_tag=$(git tag --sort=-creatordate | head -n 1)
38-
echo "Checking out tag: $latest_tag"
38+
latest_tag=$(git tag --sort=-creatordate | grep "^v" | head -n 1)
39+
echo "Using latest tag: $latest_tag"
40+
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
3941
git checkout "$latest_tag"
4042
4143
- name: Build the tensorflow lite library using Bazel
@@ -73,8 +75,18 @@ jobs:
7375
- name: Zip it up
7476
run: cd package && zip -r ../tensorflow_linux_generic_aarch64_noble.zip * && cd ..
7577

78+
- name: Create GitHub release if it doesn't exist
79+
run: |
80+
gh release view "${{ steps.tf_tag.outputs.latest_tag }}" --repo $OWNER/TensorFlow_Lite_Compiled || \
81+
gh release create "${{ steps.tf_tag.outputs.latest_tag }}" \
82+
--repo $OWNER/TensorFlow_Lite_Compiled \
83+
--title "${{ steps.tf_tag.outputs.latest_tag }}" \
84+
--notes "Auto-generated release for TensorFlow Lite ${{ steps.tf_tag.outputs.latest_tag }}"
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
7688
- name: Upload Release Asset
7789
env:
7890
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7991
run:
80-
gh release upload $(gh release view --repo ${{ ENV.OWNER }}/TensorFlow_Lite_Compiled --json tagName --jq ".tagName") tensorflow_linux_generic_aarch64_noble.zip
92+
gh release upload "${{ steps.tf_tag.outputs.latest_tag }}" tensorflow_linux_generic_aarch64_noble.zip --repo $OWNER/TensorFlow_Lite_Compiled

.github/workflows/build-x86_64-avx2-jammy.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ jobs:
3030
- name: Clone the TensorFlow repository
3131
run: git clone https://github.com/tensorflow/tensorflow
3232

33-
- name: Checkout latest tag
33+
- name: Checkout latest version tag
34+
id: tf_tag
3435
working-directory: tensorflow
3536
run: |
3637
git fetch --tags
37-
latest_tag=$(git tag --sort=-creatordate | head -n 1)
38-
echo "Checking out tag: $latest_tag"
38+
latest_tag=$(git tag --sort=-creatordate | grep "^v" | head -n 1)
39+
echo "Using latest tag: $latest_tag"
40+
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
3941
git checkout "$latest_tag"
4042
4143
- name: Build the tensorflow lite library using Bazel
@@ -73,8 +75,18 @@ jobs:
7375
- name: Zip it up
7476
run: cd package && zip -r ../tensorflow_linux_avx2_x86_64_jammy.zip * && cd ..
7577

78+
- name: Create GitHub release if it doesn't exist
79+
run: |
80+
gh release view "${{ steps.tf_tag.outputs.latest_tag }}" --repo $OWNER/TensorFlow_Lite_Compiled || \
81+
gh release create "${{ steps.tf_tag.outputs.latest_tag }}" \
82+
--repo $OWNER/TensorFlow_Lite_Compiled \
83+
--title "${{ steps.tf_tag.outputs.latest_tag }}" \
84+
--notes "Auto-generated release for TensorFlow Lite ${{ steps.tf_tag.outputs.latest_tag }}"
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
7688
- name: Upload Release Asset
7789
env:
7890
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7991
run:
80-
gh release upload $(gh release view --repo ${{ env.OWNER }}/TensorFlow_Lite_Compiled --json tagName --jq ".tagName") tensorflow_linux_avx2_x86_64_jammy.zip
92+
gh release upload "${{ steps.tf_tag.outputs.latest_tag }}" tensorflow_linux_avx2_x86_64_jammy.zip --repo $OWNER/TensorFlow_Lite_Compiled

.github/workflows/build-x86_64-avx2-noble.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ jobs:
3030
- name: Clone the TensorFlow repository
3131
run: git clone https://github.com/tensorflow/tensorflow
3232

33-
- name: Checkout latest tag
33+
- name: Checkout latest version tag
34+
id: tf_tag
3435
working-directory: tensorflow
3536
run: |
3637
git fetch --tags
37-
latest_tag=$(git tag --sort=-creatordate | head -n 1)
38-
echo "Checking out tag: $latest_tag"
38+
latest_tag=$(git tag --sort=-creatordate | grep "^v" | head -n 1)
39+
echo "Using latest tag: $latest_tag"
40+
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
3941
git checkout "$latest_tag"
4042
4143
- name: Build the tensorflow lite library using Bazel
@@ -73,8 +75,18 @@ jobs:
7375
- name: Zip it up
7476
run: cd package && zip -r ../tensorflow_linux_avx2_x86_64_noble.zip * && cd ..
7577

78+
- name: Create GitHub release if it doesn't exist
79+
run: |
80+
gh release view "${{ steps.tf_tag.outputs.latest_tag }}" --repo $OWNER/TensorFlow_Lite_Compiled || \
81+
gh release create "${{ steps.tf_tag.outputs.latest_tag }}" \
82+
--repo $OWNER/TensorFlow_Lite_Compiled \
83+
--title "${{ steps.tf_tag.outputs.latest_tag }}" \
84+
--notes "Auto-generated release for TensorFlow Lite ${{ steps.tf_tag.outputs.latest_tag }}"
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
7688
- name: Upload Release Asset
7789
env:
7890
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7991
run:
80-
gh release upload $(gh release view --repo ${{ env.OWNER }}/TensorFlow_Lite_Compiled --json tagName --jq ".tagName") tensorflow_linux_avx2_x86_64_noble.zip
92+
gh release upload "${{ steps.tf_tag.outputs.latest_tag }}" tensorflow_linux_avx2_x86_64_noble.zip --repo $OWNER/TensorFlow_Lite_Compiled

.github/workflows/build-x86_64-generic-jammy.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ jobs:
3030
- name: Clone the TensorFlow repository
3131
run: git clone https://github.com/tensorflow/tensorflow
3232

33-
- name: Checkout latest tag
33+
- name: Checkout latest version tag
34+
id: tf_tag
3435
working-directory: tensorflow
3536
run: |
3637
git fetch --tags
37-
latest_tag=$(git tag --sort=-creatordate | head -n 1)
38-
echo "Checking out tag: $latest_tag"
38+
latest_tag=$(git tag --sort=-creatordate | grep "^v" | head -n 1)
39+
echo "Using latest tag: $latest_tag"
40+
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
3941
git checkout "$latest_tag"
4042
4143
- name: Build the tensorflow lite library using Bazel
@@ -73,8 +75,18 @@ jobs:
7375
- name: Zip it up
7476
run: cd package && zip -r ../tensorflow_linux_generic_x86_64_jammy.zip * && cd ..
7577

78+
- name: Create GitHub release if it doesn't exist
79+
run: |
80+
gh release view "${{ steps.tf_tag.outputs.latest_tag }}" --repo $OWNER/TensorFlow_Lite_Compiled || \
81+
gh release create "${{ steps.tf_tag.outputs.latest_tag }}" \
82+
--repo $OWNER/TensorFlow_Lite_Compiled \
83+
--title "${{ steps.tf_tag.outputs.latest_tag }}" \
84+
--notes "Auto-generated release for TensorFlow Lite ${{ steps.tf_tag.outputs.latest_tag }}"
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
7688
- name: Upload Release Asset
7789
env:
7890
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7991
run:
80-
gh release upload $(gh release view --repo ${{ env.OWNER }}/TensorFlow_Lite_Compiled --json tagName --jq ".tagName") tensorflow_linux_gtensorflow_linux_generic_x86_64_jammyeneric_x86_64.zip
92+
gh release upload "${{ steps.tf_tag.outputs.latest_tag }}" tensorflow_linux_gtensorflow_linux_generic_x86_64_jammyeneric_x86_64.zip --repo $OWNER/TensorFlow_Lite_Compiled

.github/workflows/build-x86_64-generic-noble.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ jobs:
3131
- name: Clone the TensorFlow repository
3232
run: git clone https://github.com/tensorflow/tensorflow
3333

34-
- name: Checkout latest tag
34+
- name: Checkout latest version tag
35+
id: tf_tag
3536
working-directory: tensorflow
3637
run: |
3738
git fetch --tags
38-
latest_tag=$(git tag --sort=-creatordate | head -n 1)
39-
echo "Checking out tag: $latest_tag"
39+
latest_tag=$(git tag --sort=-creatordate | grep "^v" | head -n 1)
40+
echo "Using latest tag: $latest_tag"
41+
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
4042
git checkout "$latest_tag"
4143
4244
- name: Build the tensorflow lite library using Bazel
@@ -74,8 +76,18 @@ jobs:
7476
- name: Zip it up
7577
run: cd package && zip -r ../tensorflow_linux_generic_x86_64_noble.zip * && cd ..
7678

79+
- name: Create GitHub release if it doesn't exist
80+
run: |
81+
gh release view "${{ steps.tf_tag.outputs.latest_tag }}" --repo $OWNER/TensorFlow_Lite_Compiled || \
82+
gh release create "${{ steps.tf_tag.outputs.latest_tag }}" \
83+
--repo $OWNER/TensorFlow_Lite_Compiled \
84+
--title "${{ steps.tf_tag.outputs.latest_tag }}" \
85+
--notes "Auto-generated release for TensorFlow Lite ${{ steps.tf_tag.outputs.latest_tag }}"
86+
env:
87+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
7789
- name: Upload Release Asset
7890
env:
7991
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8092
run:
81-
gh release upload $(gh release view --repo ${{ env.OWNER }}/TensorFlow_Lite_Compiled --json tagName --jq ".tagName") tensorflow_linux_generic_x86_64_noble.zip
93+
gh release upload "${{ steps.tf_tag.outputs.latest_tag }}" tensorflow_linux_generic_x86_64_noble.zip --repo $OWNER/TensorFlow_Lite_Compiled

0 commit comments

Comments
 (0)