-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
486f5de
commit c012772
Showing
9 changed files
with
231 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Release Docker Image | ||
on: | ||
push: | ||
branches: | ||
- ci/docker-* | ||
tags: | ||
- '*' | ||
jobs: | ||
docker: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ananthakumaran/paisa | ||
- uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Linux App Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- ci/linux-app-* | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
linux-app-binary: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: cachix/install-nix-action@v22 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: npm | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20.5' | ||
- run: | | ||
sudo apt-get install -y sqlite3 libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config | ||
npm install | ||
npm run build | ||
nix-build ledger.nix | ||
cp ./result/bin/ledger internal/binary/ledger | ||
cd desktop | ||
go install github.com/wailsapp/wails/v2/cmd/wails@latest | ||
wails doctor | ||
wails build -tags webkit2_40 | ||
cp build/bin/Paisa build/linux/usr/local/bin | ||
cp -r build/linux paisa_0.5.2_amd64 | ||
dpkg --build paisa_0.5.2_amd64 | ||
cd .. | ||
mv desktop/paisa_0.5.2_amd64.deb paisa-app-linux-amd64.deb | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: | | ||
paisa-* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Linux CLI Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- ci/linux-cli-* | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
linux-cli-binary: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: cachix/install-nix-action@v22 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: npm | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20.5' | ||
- run: | | ||
sudo apt-get install -y sqlite3 | ||
npm install | ||
npm run build | ||
nix-build ledger.nix | ||
cp ./result/bin/ledger internal/binary/ledger | ||
go build | ||
cp paisa paisa-cli-linux-amd64 | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: | | ||
paisa-* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Mac OS Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- ci/mac-* | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
mac-binary: | ||
runs-on: macos-11 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: npm | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20.5' | ||
- run: | | ||
brew install --force --overwrite sqlite3 create-dmg | ||
brew install --build-from-source --verbose ./ledger.rb | ||
cp "$(brew --prefix ledger)/bin/ledger" internal/binary/ledger | ||
npm install | ||
npm run build | ||
go build | ||
cp paisa paisa-cli-macos-amd64 | ||
cd desktop | ||
go install github.com/wailsapp/wails/v2/cmd/wails@latest | ||
wails build | ||
create-dmg --volname "Paisa" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "Paisa.app" 200 190 --app-drop-link 600 185 --hide-extension "Paisa.app" --volicon build/bin/Paisa.app/Contents/Resources/iconfile.icns "Paisa.dmg" build/bin/Paisa.app | ||
cd .. | ||
cp desktop/Paisa.dmg paisa-app-macos-amd64.dmg | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: | | ||
paisa-* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Windows Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- ci/windows-* | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
windows-binary: | ||
runs-on: windows-2019 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: npm | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20.5' | ||
- run: | | ||
choco install sqlite | ||
choco install wget | ||
choco install nsis | ||
npm install | ||
npm run build | ||
wget https://github.com/FullofQuarks/Windows-Ledger-Binaries/releases/download/v3.3.2/ledger.exe | ||
cp ledger.exe internal/binary/ledger | ||
go build | ||
cp paisa.exe paisa-cli-windows-amd64.exe | ||
$env:PATH += ";C:\Program Files (x86)\NSIS\Bin" | ||
cd desktop | ||
go install github.com/wailsapp/wails/v2/cmd/wails@latest | ||
wails build -tags webkit2_40 -nsis -webview2 embed | ||
cd .. | ||
cp .\desktop\build\bin\paisa-amd64-installer.exe paisa-app-windows-amd64.exe | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: | | ||
paisa-* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM node:18-alpine3.18 as web | ||
WORKDIR /usr/src/paisa | ||
COPY package.json package-lock.json* ./ | ||
RUN npm install | ||
COPY . . | ||
RUN npm run build | ||
|
||
FROM golang:1.20-alpine3.18 as go | ||
WORKDIR /usr/src/paisa | ||
RUN apk --no-cache add sqlite gcc g++ | ||
COPY go.mod go.sum ./ | ||
RUN go mod download && go mod verify | ||
COPY . . | ||
COPY --from=web /usr/src/paisa/web/static ./web/static | ||
RUN CGO_ENABLED=1 go build | ||
|
||
FROM alpine:3.18 | ||
RUN apk --no-cache add ca-certificates ledger | ||
WORKDIR /root/ | ||
COPY --from=go /usr/src/paisa/paisa ./ | ||
RUN ./paisa init && ./paisa update | ||
ENV PAISA_DISABLE_LOG_FILE=true | ||
EXPOSE 7500 | ||
CMD ["./paisa", "serve"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters