diff --git a/.github/workflows/artifacts.yaml b/.github/workflows/artifacts.yaml index 9423987..0f5a8ed 100644 --- a/.github/workflows/artifacts.yaml +++ b/.github/workflows/artifacts.yaml @@ -47,6 +47,12 @@ jobs: run: | npm install + - name: Get package version + id: package_version + run: | + VERSION=$(node -p "require('./package.json').version") + echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Compile Circom circuits run: | mkdir -p artifacts @@ -69,7 +75,7 @@ jobs: - name: Create release artifacts run: | cd artifacts - zip -r ../circom-artifacts.zip ./* + zip -r ../circom-artifacts-v${VERSION}.zip ./* cd .. # Upload artifacts for PR @@ -77,7 +83,7 @@ jobs: if: github.event_name == 'pull_request' uses: actions/upload-artifact@v4 with: - name: circom-artifacts + name: circom-artifacts-v${{ env.VERSION }} path: artifacts/ retention-days: 5 @@ -86,11 +92,12 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: softprops/action-gh-release@v1 with: - files: circom-artifacts.zip - name: Circuit Artifacts ${{ github.sha }} - tag_name: v${{ github.run_number }} + files: circom-artifacts-v${{ env.VERSION }}.zip + name: Circuit Artifacts v${{ env.VERSION }} + tag_name: v${{ env.VERSION }} body: | Automated release of compiled Circom circuits + Version: ${{ env.VERSION }} Commit: ${{ github.sha }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file