Skip to content

Commit

Permalink
fix: fix renovate to update version in snapcraft.yaml too (#9)
Browse files Browse the repository at this point in the history
* fix: fix renovate to update version in snapcraft.yaml too

* chore: add workflow for testing snap build

* fix: change node to 20.2.0 and yarn to 1.22.19
  • Loading branch information
amandahla authored Oct 3, 2024
1 parent 09f9c1c commit f3532cb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test build Snap

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

jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: snapcore/action-build@v1
id: snapcraft
required_status_checks:
name: Required Build Test Status Check
runs-on: ubuntu-latest
needs:
- build-test
if: always() && !cancelled()
timeout-minutes: 5
steps:
- run: |
[ '${{ needs.build-test.result }}' = 'success' ] || (echo build-test failed && false)
6 changes: 4 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"description": "Update Mjolnir",
"matchStringsStrategy": "any",
"matchStrings": [
"source-tag: (?<currentValue>v.+)"
"source-tag: v(?<currentValue>.+)",
"version: (?<currentValue>.+)"
],
"datasourceTemplate": "github-releases",
"depNameTemplate": "matrix-org/mjolnir"
"depNameTemplate": "matrix-org/mjolnir",
"extractVersionTemplate": "^v?(?<version>.*)$"
}
],
"packageRules": [
Expand Down
7 changes: 3 additions & 4 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: mjolnir
summary: Mjolnir snap
description: A moderation tool for Matrix
version: "1.7.0"
version: 1.8.0
base: core22
license: Apache-2.0
confinement: strict
Expand All @@ -19,7 +19,7 @@ apps:
parts:
node:
plugin: dump
source: https://nodejs.org/dist/v18.0.0/node-v18.0.0-linux-x64.tar.xz
source: https://nodejs.org/dist/v20.2.0/node-v20.2.0-linux-x64.tar.xz
stage:
- bin
- include
Expand All @@ -31,8 +31,7 @@ parts:
source-tag: v1.8.0
source-type: git
override-build: |
npm install -g yarn
npm install @matrix-org/matrix-sdk-crypto-nodejs
npm install -g yarn@1.22.19
yarn install
yarn build
mv lib $CRAFT_PRIME/mjolnir
Expand Down

0 comments on commit f3532cb

Please sign in to comment.