Skip to content

Commit

Permalink
Merge pull request #1787 from decentdao/semver-and-tagged-releases
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrila authored May 15, 2024
2 parents eabaa9d + 5343936 commit b50892b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 12 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 0 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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."
/>
<meta
name="git-hash"
content="%VITE_APP_GIT_HASH%"
/>
<link
rel="apple-touch-icon"
href="/images/logo192.png"
Expand Down
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "fractal-interface",
"version": "0.1.0",
"private": true,
"dependencies": {
"@adraffy/ens-normalize": "^1.10.1",
Expand Down Expand Up @@ -60,10 +61,10 @@
"lint:check": "eslint . --ext .ts,.tsx",
"pretty": "prettier . --write",
"pretty:check": "prettier . --check",
"dev": "VITE_APP_GIT_HASH=`git rev-parse HEAD` vite --force",
"dev": "vite --force",
"start": "vite start",
"preview": "vite preview",
"build": "VITE_APP_GIT_HASH=`git rev-parse HEAD` NODE_OPTIONS=--max-old-space-size=8192 vite build",
"build": "NODE_OPTIONS=--max-old-space-size=8192 vite build",
"graphql:build": "graphclient build",
"graphql:dev-server": "graphclient serve-dev",
"test": "vitest --dir=test",
Expand Down
7 changes: 2 additions & 5 deletions src/components/pages/AppHome/AppFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,10 @@ export function AppFooter({ ...rest }: BoxProps) {
|
</Text>
<ExternalLink
href={
'https://github.com/decent-dao/fractal-interface/commit/' +
import.meta.env.VITE_APP_GIT_HASH
}
href={`https://github.com/decent-dao/fractal-interface/releases/tag/v${import.meta.env.PACKAGE_VERSION}`}
textStyle="text-sm-mono-bold"
>
{import.meta.env.VITE_APP_GIT_HASH.substring(0, 7)}
v{import.meta.env.PACKAGE_VERSION}
</ExternalLink>
</Flex>
</Box>
Expand Down
3 changes: 2 additions & 1 deletion src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
/// <reference types="vite/client" />

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;
Expand Down
4 changes: 4 additions & 0 deletions vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -12,4 +13,7 @@ export default defineConfig({
build: {
sourcemap: true,
},
define: {
'import.meta.env.PACKAGE_VERSION': JSON.stringify(packageJson.version),
},
});

0 comments on commit b50892b

Please sign in to comment.