diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000000..6916f28785 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,17 @@ +name: Publish Release +on: + push: + tags: + - 'v*.*.*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + target_commitish: main diff --git a/index.html b/index.html index 0a55d7dc75..496b89f8d7 100644 --- a/index.html +++ b/index.html @@ -15,10 +15,6 @@ name="description" content="Are you outgrowing your Multisig? Fractal extends Safe treasuries into on-chain hierarchies of permissions, token flows, and governance." /> - - {import.meta.env.VITE_APP_GIT_HASH.substring(0, 7)} + v{import.meta.env.PACKAGE_VERSION} diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 8a63dcca2a..c9f2325c48 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -2,8 +2,9 @@ /// interface ImportMetaEnv { + readonly PACKAGE_VERSION: string; + readonly VITE_APP_NAME: string; - readonly VITE_APP_GIT_HASH: string; readonly VITE_APP_ALCHEMY_MAINNET_API_KEY: string; readonly VITE_APP_ALCHEMY_POLYGON_API_KEY: string; diff --git a/vite.config.mts b/vite.config.mts index 4bea8baf55..15aac04e3e 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -2,6 +2,7 @@ import react from '@vitejs/plugin-react-swc'; import { defineConfig } from 'vite'; import { checker } from 'vite-plugin-checker'; import { nodePolyfills } from 'vite-plugin-node-polyfills'; +import packageJson from './package.json'; // https://vitejs.dev/config/ export default defineConfig({ @@ -12,4 +13,7 @@ export default defineConfig({ build: { sourcemap: true, }, + define: { + 'import.meta.env.PACKAGE_VERSION': JSON.stringify(packageJson.version), + }, });