From 7e0ede379fc753665c9fbafcf0411632c048b247 Mon Sep 17 00:00:00 2001 From: Mahmoud Ayman Date: Sat, 2 Nov 2024 11:53:33 +0200 Subject: [PATCH] workflo(build): versioning --- .github/workflows/build.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c3abaad..4349284 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,6 +17,11 @@ jobs: run: npm install - name: Install web-ext run: npm install --global web-ext + - name: Extract version from manifest.json + id: get_version + run: | + version=$(jq -r '.version' manifest.json) + echo "version=$version" >> $GITHUB_ENV - name: Inject environment variables into weather.js run: | sed -i 's/const key = "";/const key = "${{ secrets.KEY }}";/' js/weather.js @@ -39,6 +44,7 @@ jobs: - name: Release uses: ncipollo/release-action@v1.14.0 with: + tag: ${{ env.version }} artifacts: "web-ext-artifacts/*.xpi" allowUpdates: true replacesArtifacts: true