fix warning as error NU1900 (#41) #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push to master | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Push to master | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set common vars | |
id: common_vars | |
run: | | |
version_prefix=$(cat ./src/Dodo.DataMover/Dodo.DataMover.csproj | grep "<VersionPrefix>" | sed -e "s/ *<\/*VersionPrefix>//g") | |
version_suffix="${{ github.run_number }}" | |
if [ -z "${version_prefix}" ]; then exit 1; fi | |
app_version="${version_prefix}.${version_suffix}" | |
echo "app_version: ${app_version}" | |
echo "app_version=${app_version}" >> $GITHUB_OUTPUT | |
- name: Integration test | |
timeout-minutes: 30 | |
run: | | |
./run-integration-tests.sh | |
- name: Get binaries from built image | |
run: | | |
./zip-release-binaries.sh linux-x64 | |
./zip-release-binaries.sh linux-musl-x64 | |
./zip-release-binaries.sh linux-arm64 | |
./zip-release-binaries.sh win-x64 | |
./zip-release-binaries.sh win-arm64 | |
./zip-release-binaries.sh osx-x64 | |
./zip-release-binaries.sh osx-arm64 | |
- name: Create draft release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.common_vars.outputs.app_version }} | |
release_name: Release v${{ steps.common_vars.outputs.app_version }} | |
draft: true | |
prerelease: false | |
- name: Upload linux-x64 release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./mysql-data-mover/mysql-data-mover_linux-x64.zip | |
asset_name: mysql-data-mover_linux-x64.zip | |
asset_content_type: application/zip | |
- name: Upload linux-musl-x64 release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./mysql-data-mover/mysql-data-mover_linux-musl-x64.zip | |
asset_name: mysql-data-mover_linux-musl-x64.zip | |
asset_content_type: application/zip | |
- name: Upload linux-arm64 release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./mysql-data-mover/mysql-data-mover_linux-arm64.zip | |
asset_name: mysql-data-mover_linux-arm64.zip | |
asset_content_type: application/zip | |
- name: Upload win-x64 release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./mysql-data-mover/mysql-data-mover_win-x64.zip | |
asset_name: mysql-data-mover_win-x64.zip | |
asset_content_type: application/zip | |
- name: Upload win-arm64 release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./mysql-data-mover/mysql-data-mover_win-arm64.zip | |
asset_name: mysql-data-mover_win-arm64.zip | |
asset_content_type: application/zip | |
- name: Upload osx-x64 release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./mysql-data-mover/mysql-data-mover_osx-x64.zip | |
asset_name: mysql-data-mover_osx-x64.zip | |
asset_content_type: application/zip | |
- name: Upload osx-arm64 release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./mysql-data-mover/mysql-data-mover_osx-arm64.zip | |
asset_name: mysql-data-mover_osx-arm64.zip | |
asset_content_type: application/zip |