Skip to content

Define the path to the directory that contains the Chrome extensions #1

Define the path to the directory that contains the Chrome extensions

Define the path to the directory that contains the Chrome extensions #1

Workflow file for this run

name: .NET
on:
push:
tags:
- '*'
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Get release tag
shell: bash
id: tag_name
run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.100
- name: Setup .NET 2.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.x
- name: Build OpenBullet2
run: dotnet publish OpenBullet2/OpenBullet2.csproj -c Release -o .publish/OpenBullet2
- name: Build Updater
run: dotnet publish Updater/Updater.csproj -c Release -o .publish/OpenBullet2
- name: Build Native
run: dotnet publish OpenBullet2.Native/OpenBullet2.Native.csproj -c Release -o .publish/OB2Native
- name: Build Console
run: dotnet publish OpenBullet2.Console/OpenBullet2.Console.csproj -c Release -o .publish/OB2Console
- name: Build Native Updater
run: dotnet publish Updater.Native/Updater.Native.csproj -c Release -o .publish/OB2Native
- name: get ncbeauty
run: dotnet tool install --global nulastudio.ncbeauty
- name: run ncbeauty
run: ncbeauty -nopatch -noflag D:/a/OpenBullet2/OpenBullet2/.publish/OB2Native/
- name: remove unwanted Files
shell: pwsh
run: Get-ChildItem .publish -recurse -include *.pdb,*.xml | remove-item -force
- name: Zip OpenBullet2
shell: pwsh
run: Compress-Archive -Path .publish/OpenBullet2/* -DestinationPath .publish/OpenBullet2.zip
- name: Zip OB2Native
shell: pwsh
run: Compress-Archive -Path .publish/OB2Native/* -DestinationPath .publish/OpenBullet2.Native.zip
- name: Zip OB2Console
shell: pwsh
run: Compress-Archive -Path .publish/OB2Console/* -DestinationPath .publish/OpenBullet2.Console.zip
- name: Upload OpenBullet2
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '.publish/OpenBullet2.zip'
tag: ${{ steps.tag_name.outputs.SOURCE_TAG }}
overwrite: true
- name: Upload OB2Native
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '.publish/OpenBullet2.Native.zip'
tag: ${{ steps.tag_name.outputs.SOURCE_TAG }}
overwrite: true
- name: Upload OB2Console
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '.publish/OpenBullet2.Console.zip'
tag: ${{ steps.tag_name.outputs.SOURCE_TAG }}
overwrite: true
- name: Checkout Diffcopy repo
uses: actions/checkout@v2
with:
repository: openbullet/DiffCopy
path: DiffCopy
- name: Build Diffcopy
run: dotnet publish DiffCopy/DiffCopy.sln -c Release -o .tools/DiffCopy
- name: Download Baseline
shell: pwsh
run: Invoke-WebRequest -Uri "https://github.com/openbullet/OpenBullet2/releases/download/0.2.0/OpenBullet2.zip" -OutFile "baseline.zip"
- name: Unzip Baseline
shell: pwsh
run: Expand-Archive ./baseline.zip -DestinationPath ./baseline
- name: run Diffcopy
run: dotnet .tools/DiffCopy/DiffCopy.dll -s baseline/OpenBullet2 -n .publish/OpenBullet2 -o .publish/Patch
- name: Zip Patch
shell: pwsh
run: Compress-Archive -Path .publish/Patch/* -DestinationPath .publish/Patch.zip
- name: Upload Patch
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '.publish/Patch.zip'
tag: ${{ steps.tag_name.outputs.SOURCE_TAG }}
overwrite: true
- name: update release
uses: tubone24/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
release_name: ${{ steps.tag_name.outputs.SOURCE_TAG }}
body: Please refer to [this post](https://discourse.openbullet.dev/t/wip-how-to-download-and-start-openbullet-2/29) on the official forum to learn how to launch OpenBullet 2.
push_to_docker:
name: Push Docker image to Docker Hub
needs: build
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Get release tag
shell: bash
id: dockertag
run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
tags: openbullet/openbullet2:latest,openbullet/openbullet2:${{ steps.dockertag.outputs.SOURCE_TAG }}