diff --git a/.github/workflows/assets.yaml b/.github/workflows/assets.yaml deleted file mode 100644 index fa41992..0000000 --- a/.github/workflows/assets.yaml +++ /dev/null @@ -1,89 +0,0 @@ ---- -name: Build Assets -on: - release: - types: [created] - -env: - RUSTFLAGS: "-Dwarnings" - CARGO_TERM_COLOR: always - -jobs: - release: - strategy: - fail-fast: false - matrix: - platform: [macos-latest, ubuntu-latest, windows-latest] - - runs-on: ${{ matrix.platform }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - uses: cardinalby/git-get-release-action@v1 - id: get-release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - commitSha: ${{ github.sha }} - prerelease: false - - - name: Install webkit2gtk (ubuntu only) - - if: matrix.platform == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y webkit2gtk-4.0 - - - name: Setup PNPM - uses: pnpm/action-setup@v3 - with: - version: latest - - - name: Setup node and Cache .pnpm-store - uses: actions/setup-node@v4 - with: - node-version: latest - cache: "pnpm" - - - name: Rust setup - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - - - name: Set up cargo cache - uses: actions/cache@v4 - continue-on-error: false - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- - - - name: Install cargo-edit - uses: actions-rs/install@v0.1 - with: - crate: cargo-edit - version: latest - use-tool-cache: true - - - name: Adjust Version - working-directory: src-tauri - run: | - cargo set-version "$(echo ${{ github.ref_name }} | sed s/v// )" - - - name: Install dependencies - run: pnpm install - - - name: Build - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - with: - releaseId: ${{ steps.get-release.outputs.id }} - tauriScript: "pnpm" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a6a4fe7..525a1b6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,27 +1,114 @@ --- -name: Semantic Release - +name: Release on: - push: - branches: - - main - workflow_call: - secrets: - PAT: - required: true + release: + types: [created] + +env: + RUSTFLAGS: "-Dwarnings" + CARGO_TERM_COLOR: always jobs: - release: - name: Semantic Release + assets: + name: Build and upload assets + strategy: + fail-fast: false + matrix: + platform: [macos-latest, ubuntu-latest, windows-latest] + + runs-on: ${{ matrix.platform }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: cardinalby/git-get-release-action@v1 + id: get-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + commitSha: ${{ github.sha }} + prerelease: false + + - name: Install webkit2gtk (ubuntu only) + + if: matrix.platform == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y webkit2gtk-4.0 + + - name: Setup PNPM + uses: pnpm/action-setup@v2 + with: + version: latest + - name: Setup node and Cache .pnpm-store + uses: actions/setup-node@v4 + with: + node-version: latest + cache: "pnpm" + + - name: Rust setup + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + + - name: Set up cargo cache + uses: actions/cache@v4 + continue-on-error: false + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- + + - name: Install cargo-edit + uses: actions-rs/install@v0.1 + with: + crate: cargo-edit + version: latest + use-tool-cache: true + + - name: Adjust Version + working-directory: src-tauri + run: | + cargo set-version "$(echo ${{ github.ref_name }} | sed s/v// )" + + - name: Install dependencies + run: pnpm install + + - name: Build + uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + with: + releaseId: ${{ steps.get-release.outputs.id }} + tauriScript: "pnpm" + + pkgbuild: + name: Update PKGBUILD runs-on: ubuntu-latest + needs: assets steps: - name: Checkout uses: actions/checkout@v4 - - name: Semantic Release - uses: go-semantic-release/action@v1 - id: semrel + - name: adjust version + run: | + export VERSION=${{ github.ref_name }} + sed -i "s/pkgver=\"0.0.0\"/pkgver=\"${VERSION#v}\"/" PKGBUILD + + - name: Release AUR package + uses: jbouter/aur-releaser@v0.0.9 with: - allow-initial-development-versions: true - github-token: ${{ secrets.PAT }} + pkgname: vault-gui-bin + pkgbuild: ./PKGBUILD + commit_username: ${{ secrets.AUR_USERNAME }} + commit_email: ${{ secrets.AUR_EMAIL }} + ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} + commit_message: update to ${{ github.ref_name }} + ssh_keyscan_types: rsa,dsa,ecdsa,ed25519 diff --git a/.github/workflows/semantic-release.yaml b/.github/workflows/semantic-release.yaml new file mode 100644 index 0000000..a6a4fe7 --- /dev/null +++ b/.github/workflows/semantic-release.yaml @@ -0,0 +1,27 @@ +--- +name: Semantic Release + +on: + push: + branches: + - main + workflow_call: + secrets: + PAT: + required: true + +jobs: + release: + name: Semantic Release + + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Semantic Release + uses: go-semantic-release/action@v1 + id: semrel + with: + allow-initial-development-versions: true + github-token: ${{ secrets.PAT }} diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..0107b44 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,25 @@ +# Maintainer: Arthur Deierlein + +_pkgname=vault-gui +pkgname=$_pkgname-bin +pkgver="0.0.0" +pkgrel=1 +pkgdesc="GUI for Hashicorps Vault" +arch=('x86_64') +url="https://github.com/adfinis/vault-gui" +license=('MIT') +depends=('openssl' 'webkit2gtk') +source=("https://github.com/adfinis/vault-gui/releases/download/v${pkgver}/vault-gui_${pkgver}_amd64.deb") +makedepends=('binutils' 'tar') +provides=("vault-gui=${pkgver}") +conflicts=('vault-gui-git') +b2sums=('SKIP') + +prepare() { + ar p vault-gui_${pkgver}_amd64.deb data.tar.gz | tar zx +} + +package() { + cd $srcdir + cp -R usr ${pkgdir} +}