From 376a0a468667a477877a74dd66f1c8a1cad77244 Mon Sep 17 00:00:00 2001 From: mahmoudabdalkarim Date: Sun, 17 Nov 2024 14:22:55 +0200 Subject: [PATCH] Fix tag name --- .github/workflows/generate-bundle.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate-bundle.yml b/.github/workflows/generate-bundle.yml index 8c9b798..b38b3e3 100644 --- a/.github/workflows/generate-bundle.yml +++ b/.github/workflows/generate-bundle.yml @@ -4,7 +4,7 @@ on: push: branches: - release - workflow_dispatch: # Enables manual trigger + workflow_dispatch: jobs: generate-bundle: @@ -19,7 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: 16 # Use the Node.js version compatible with your React Native app + node-version: 16 # Step 3: Install dependencies - name: Install dependencies @@ -36,14 +36,21 @@ jobs: --bundle-output dist/index.android.bundle \ --assets-dest dist/ - # Step 5: Upload the bundle to GitHub Releases + # Step 5: Create a valid tag + - name: Create Tag + id: create_tag + run: | + TAG_NAME="release-$(date +'%Y%m%d-%H%M%S')" + echo "tag_name=${TAG_NAME}" >> $GITHUB_ENV + + # Step 6: Upload the bundle to GitHub Releases - name: Create GitHub Release uses: ncipollo/release-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} artifacts: dist/index.android.bundle - tag: ${{ github.sha }} - releaseName: "JS Bundle - ${{ github.ref_name }}" + tag: ${{ env.tag_name }} + releaseName: "JS Bundle - ${{ env.tag_name }}" body: "This release contains the latest JavaScript bundle." draft: false prerelease: true