Skip to content

Commit

Permalink
Release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
KacperMalachowski committed Feb 18, 2024
1 parent 2e4bbdc commit 41e790a
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
29 changes: 29 additions & 0 deletions .github/workflows/dependabot-approve.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Dependabot auto-approve
on: pull_request

permissions: read-all

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1
- uses: action@checkout@v4
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Approve a PR if not already approved
run: |
gh pr checkout "$PR_URL"
if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ];
then gh pr review --approve "$PR_URL"
else echo "PR already approved, skipping additional approvals to minimize emails/notification noise.";
fi
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
59 changes: 59 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Wails build

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'

env:
NODE_OPTIONS: "--max-old-space-size=4096"

jobs:
build:
name: Build
strategy:
matrix:
build:
- name: 'MarshalController'
platform: 'windows/amd64'
os: 'windows'
runs-on: ${{ matrix.build.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build wails
uses: dAppServer/[email protected]
id: build
with:
build-name: ${{ matrix.build.name }}
build-platform: ${{ matrix.build.platform }}
go-version: '1.21'
create_release:
name: Create release
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create release tag
id: create_release
run: |
TAG="v$(date +'%d%m%Y')-$(echo ${{ github.sha }} | cut -c1-8)"
echo "Creating release tag $TAG"
echo "::set-output name=tag::$TAG"
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "./artifacts/**/*"
generateReleaseNotes: true
tag: ${{ steps.create_release.outputs.tag }}

0 comments on commit 41e790a

Please sign in to comment.