Skip to content

Commit

Permalink
Configuring Release-Please to create releases for Apps / Packages (#1502
Browse files Browse the repository at this point in the history
)

* feat: removing release-it workflow

* feat: applying some builds only on merge to main

* feat: adding yarn poisoning as a dep

* feat: trying to fix yarn poisoning error

* fix: namadillo should build fully

* fix: fixing weird type errors

* feat: initial release-please config

* fix: fixing ci for extension build

* feat: adding different projects and refactor config

* fix: fixing release actions

* fix: more fixes on the actions

* feat: final review and test
  • Loading branch information
pedrorezende authored Jan 14, 2025
1 parent 2b7348e commit 8a01328
Show file tree
Hide file tree
Showing 37 changed files with 9,194 additions and 10,023 deletions.
38 changes: 38 additions & 0 deletions .github/actions/build-extension/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: build-extension
description: Build the browser extension and upload to Github release
on:
workflow_call:
inputs:
browser:
required: true
type: string
tag:
required: true
type: string

runs:
using: composite
steps:
- name: Install Dependencies
uses: ./.github/actions/prepare-build

- name: Build WASM dependencies
working-directory: ./apps/extension
run: yarn wasm:build
shell: bash

- name: Build ${{ inputs.browser }} extension
working-directory: ./apps/extension
env:
SHA: ${{ github.sha }}
run: |
NAMADA_INTERFACE_REVISION=$SHA yarn build:${{ inputs.browser }}
shell: bash

- name: Upload ${{ inputs.browser }} Artifact
run: |
BASE_VERSION=$(node -e 'console.log(require("./apps/extension/package.json").version)')
FILENAME=namada-keychain-${{ inputs.browser }}-${BASE_VERSION}.zip
mv ./apps/extension/build/${{ inputs.browser }}/namada_keychain-${BASE_VERSION}.zip ${FILENAME}
gh release upload ${{ inputs.tag }} ${FILENAME}
shell: bash
16 changes: 16 additions & 0 deletions .github/actions/prepare-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: prepare-build
description: Prepare the build environment
runs:
using: composite
steps:
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache

- name: Restore Rust cache
uses: ./.github/actions/rust-cache
with:
cache-name: build

- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
shell: bash
32 changes: 32 additions & 0 deletions .github/actions/release-project/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: release-project
description: Upload the project artifact to the GitHub release
on:
workflow_call:
inputs:
tag:
required: true
type: string
bundle_filename:
required: true
type: string
working_dir:
required: true
type: string

runs:
using: composite
steps:
- name: Install Dependencies
uses: ./.github/actions/prepare-build

- name: Build Artifact
working-directory: ${{ inputs.working_dir }}
run: yarn build
shell: bash

- name: Upload artifact
working-directory: ${{ inputs.working_dir }}/dist
run: |
zip -r ${{ inputs.bundle_filename }} .
gh release upload ${{ inputs.tag }} ${{ inputs.bundle_filename }}
shell: bash
135 changes: 0 additions & 135 deletions .github/workflows/deploy-wallet-at-merge-to-main.yml

This file was deleted.

10 changes: 2 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ name: Docker 🐳

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
Expand Down Expand Up @@ -61,4 +55,4 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max
44 changes: 0 additions & 44 deletions .github/workflows/release-namadillo.yml

This file was deleted.

Loading

0 comments on commit 8a01328

Please sign in to comment.