Skip to content

Merge pull request #24 from galadril/align-versioning #1

Merge pull request #24 from galadril/align-versioning

Merge pull request #24 from galadril/align-versioning #1

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
workflow_dispatch:
env:
VERSION: 1.0.6
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore ./Windows/CaptureWolf.sln
- name: Setup VS Dev Environment
uses: seanmiddleditch/gha-setup-vsdevenv@v4
- name: Update version in .vdproj file
run: |
$content = Get-Content -Path ./Windows/CaptureWolf.Installer/CaptureWolf.Installer.vdproj -Raw
$content = $content -replace '(?<=ProductVersion" = "8:)\d+\.\d+\.\d+', '${{ env.VERSION }}'
Set-Content -Path ./Windows/CaptureWolf.Installer/CaptureWolf.Installer.vdproj -Value $content
shell: pwsh
- name: Build
run: dotnet build --configuration Release --no-restore ./Windows/CaptureWolf.Form/CaptureWolf.UI.csproj
- name: Build Installer
run: devenv.com ./Windows/CaptureWolf.Installer/CaptureWolf.Installer.vdproj /build "Release|Any CPU"
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: output
path: ./Windows/CaptureWolf.Form/bin/Release/
- name: Upload Installer
uses: actions/upload-artifact@v2
with:
name: installer
path: ./Windows/CaptureWolf.Installer/Release/
- name: Commit version bump
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add ./Windows/CaptureWolf.Installer/CaptureWolf.Installer.vdproj
git commit -m "Bump version to ${{ env.VERSION }}"
shell: bash
build-osx:
runs-on: macos-14
defaults:
run:
working-directory: ${{ github.workspace }}/OSX
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Checkout files
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 21
- name: "Setup git user"
run: |
git config user.name "GitHub Actions"
git config user.email "<>"
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: List Xcode installations
run: sudo ls -1 /Applications | grep "Xcode"
- name: Select XCode version
uses: maxim-lobanov/[email protected]
with:
xcode-version: '15.2.0'
- name: Create Cert folder
run: mkdir -p cert
- name: Decode signing certificate into a file
env:
CERTIFICATE_BASE64: ${{ secrets.SIGNING_CERT }}
run: echo $CERTIFICATE_BASE64 | base64 --decode > ./cert/signing-cert.cer
- name: Decode signing key into a file
env:
KEY_BASE64: ${{ secrets.SIGNING_KEY }}
run: echo $KEY_BASE64 | base64 --decode > ./cert/signing-key.p12
- name: Install dependencies
run: bundle install
- name: Bump ios version
uses: yanamura/ios-bump-version@v1
with:
version: ${{ env.VERSION }}
project-path: OSX
- name: Deploy app
run: bundle exec fastlane mac release --verbose
env:
SIGNING_CERT_PASSWORD: ${{ secrets.SIGNING_CERT_PASSWORD }}
SIGNING_CERT_FILE_PATH: ./cert/signing-cert.cer
SIGNING_KEY_FILE_PATH: ./cert/signing-key.p12
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: output
path: ./OSX/release/
- name: "Show changes"
run: |
git status
# Commit all changed files back to the repository
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5