Skip to content

Commit

Permalink
Merge branch 'main' into ci/enable-codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
mhochsto authored Sep 17, 2024
2 parents 2eac34a + 4a75b71 commit 1451913
Show file tree
Hide file tree
Showing 13 changed files with 5,718 additions and 61 deletions.
9 changes: 9 additions & 0 deletions .auto-changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"package": true,
"output": "CHANGELOG.md",
"template": "compact",
"unreleased": false,
"commitLimit": false,
"ignoreCommitPattern": "^(?!.*\\(\\#\\d+\\)$).*",
"releaseSummary": false
}
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.java]
ij_java_imports_layout = $*, |, javax.**, java.**, |, *

[*.gradle]
indent_size = 4

[{*.json,*.jschema}]
indent_size = 4

[*.md]
max_line_length = off
trim_trailing_whitespace = false
9 changes: 9 additions & 0 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: cache
on:
pull_request:
types:
- closed
jobs:
cache_cleanup:
name: Clean up cache
uses: evva-sfw/.github/workflows/cache.yml@main
83 changes: 83 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: release
on:
workflow_dispatch:
inputs:
input_version:
type: choice
description: What type of release?
options:
- patch
- minor
- major

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release_publish:
runs-on: ubuntu-latest
environment: pub.dev # is configured in repo settings with secrets
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ssh-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}

- name: Debug inputs
run: |
echo "Type of release:${{ github.event.inputs.input_version }} from user ${GITHUB_ACTOR}"
git config --list
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Cache node_modules
id: node-modules
uses: actions/cache@v4
with:
path: |
node_modules
test-app/node_modules
.yarn/cache
key: node-modules

- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true

- name: GPG user IDs
run: |
echo "fingerprint: ${{ steps.import-gpg.outputs.fingerprint }}"
echo "keyid: ${{ steps.import-gpg.outputs.keyid }}"
echo "name: ${{ steps.import-gpg.outputs.name }}"
echo "email: ${{ steps.import-gpg.outputs.email }}"
- name: git config
run: |
git config user.name "${{ steps.import-gpg.outputs.name }}"
git config user.email "${{ steps.import-gpg.outputs.email }}"
- name: Setup Flutter
uses: ./.github/actions/flutter-setup

- name: Install dependencies
run: npm i

- name: Run release-it
run: npx release-it ${{ github.event.inputs.input_version }} --ci
env:
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}

- name: Attest
uses: actions/attest-build-provenance@v1
with:
subject-path: '${{ github.workspace }}/*.tgz'
13 changes: 3 additions & 10 deletions .github/workflows/semantic.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
name: semantic

on:
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened

permissions:
pull-requests: read

jobs:
semantic_pr:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
semantic_pr-name:
name: semantic_pr-name
uses: evva-sfw/.github/semantic.yml@main
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ migrate_working_dir/
**/doc/api/
.dart_tool/
build/

node_modules
test-results.json
*.tgz
5 changes: 5 additions & 0 deletions .pubignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
Makefile
node_modules
package-lock.json
package.json
96 changes: 96 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"$schema": "https://unpkg.com/release-it@17/schema/release-it.json",
"hooks": {
"after:bump": [
"rm -f *.tgz",
"flutter pub get",
"npx auto-changelog -v ${version} -c .auto-changelog",
"flutter pub publish --to-archive abrevva_${version}.tgz"
],
"before:github:release": "flutter pub publish --force"
},
"npm": {
"skipChecks": true,
"publish": false,
"allowSameVersion": true
},
"git": {
"commitMessage": "chore: release ${version}",
"tagName": "${version}",
"commitArgs": [
"-S"
],
"tagArgs": [
"-s"
],
"push": false
},
"github": {
"release": true,
"assets": [
"*.tgz"
],
"tokenRef": "BOT_GITHUB_TOKEN"
},
"plugins": {
"@release-it/bumper": {
"in": {
"file": "./pubspec.yaml",
"path": "version"
},
"out": {
"file": "./pubspec.yaml",
"path": "version"
}
},
"@release-it/conventional-changelog": {
"ignoreRecommendedBump": true,
"infile": "CHANGELOG.md",
"preset": {
"name": "conventionalcommits",
"types": [
{
"type": "feat",
"section": "🎉 Features"
},
{
"type": "fix",
"section": "🐛 Bug Fixes"
},
{
"type": "perf",
"section": "⚡️ Performance Improvements"
},
{
"type": "revert",
"section": "⏪️ Reverts"
},
{
"type": "docs",
"section": "📝 Documentation"
},
{
"type": "style",
"section": "🎨 Styles"
},
{
"type": "refactor",
"section": "🔀 Code Refactoring"
},
{
"type": "test",
"section": "🧪 Tests"
},
{
"type": "build",
"section": "⚙️ Build System"
},
{
"type": "ci",
"section": "🚀 Continuous Integration"
}
]
}
}
}
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"[dart]": {
"editor.defaultFormatter": "Dart-Code.flutter",
"editor.formatOnSave": true,
}
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
Loading

0 comments on commit 1451913

Please sign in to comment.