Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1828bacfa8 |
59
.github/.workflows/master.yml
vendored
Normal file
59
.github/.workflows/master.yml
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
# Controls when the action will run.
|
||||||
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the master branch
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
tags:
|
||||||
|
- 'Vault/*'
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
AZURE_STORAGE_CONTAINER: dist
|
||||||
|
|
||||||
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
|
jobs:
|
||||||
|
debian-x64:
|
||||||
|
name: debian-x64
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: ./Build/CI/build.sh
|
||||||
|
env:
|
||||||
|
RID: debian-x64
|
||||||
|
PGP_KEY: ${{ secrets.PGP_KEY }}
|
||||||
|
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
|
||||||
|
linux-x64:
|
||||||
|
name: linux-x64
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: ./Build/CI/build.sh
|
||||||
|
env:
|
||||||
|
RID: linux-x64
|
||||||
|
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
|
||||||
|
osx-x64:
|
||||||
|
name: osx-x64
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: ./Build/CI/build.sh
|
||||||
|
env:
|
||||||
|
RID: osx-x64
|
||||||
|
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
|
||||||
|
win-x64:
|
||||||
|
name: win-x64
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: ./Build/CI/build.sh
|
||||||
|
env:
|
||||||
|
RID: win-x64
|
||||||
|
WINDOWS_CERT: ${{ secrets.WINDOWS_CERT }}
|
||||||
|
WINDOWS_CERT_PASSWORD: ${{ secrets.WINDOWS_CERT_PASSWORD }}
|
||||||
|
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
|
||||||
|
|
||||||
|
|
||||||
0
Build/travis/applesign.sh → Build/CI/applesign.sh
Executable file → Normal file
0
Build/travis/applesign.sh → Build/CI/applesign.sh
Executable file → Normal file
32
Build/travis/build.sh → Build/CI/build.sh
Executable file → Normal file
32
Build/travis/build.sh → Build/CI/build.sh
Executable file → Normal file
@ -3,14 +3,22 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
DOCKER_IMAGE_NAME="vault-$RID"
|
DOCKER_IMAGE_NAME="vault-$RID"
|
||||||
|
DOCKER_BUILD_ARGS=""
|
||||||
|
if [[ "$PGP_KEY" ]]; then
|
||||||
|
DOCKER_BUILD_ARGS="--build-arg "PGP_KEY=$PGP_KEY""
|
||||||
|
fi
|
||||||
|
if [[ "$WINDOWS_CERT" ]]; then
|
||||||
|
DOCKER_BUILD_ARGS="$DOCKER_BUILD_ARGS --build-arg "WINDOWS_CERT=$WINDOWS_CERT" --build-arg "WINDOWS_CERT_PASSWORD=$WINDOWS_CERT_PASSWORD""
|
||||||
|
fi
|
||||||
|
|
||||||
docker build -t "$DOCKER_IMAGE_NAME" $DOCKER_BUILD_ARGS -f "Build/$RID/Dockerfile" .
|
docker build -t "$DOCKER_IMAGE_NAME" $DOCKER_BUILD_ARGS -f "Build/$RID/Dockerfile" .
|
||||||
docker run --rm -v "$(pwd)/dist:/opt/dist" "$DOCKER_IMAGE_NAME"
|
docker run --rm -v "$(pwd)/dist:/opt/dist" "$DOCKER_IMAGE_NAME"
|
||||||
|
|
||||||
if [[ "$TRAVIS_TAG" ]]; then
|
if [[ "$GITHUB_REF_NAME" ]]; then
|
||||||
travis_version="$(echo "$TRAVIS_TAG" | cut -d'/' -f2)"
|
ci_version="$(echo "$GITHUB_REF_NAME" | cut -d'/' -f2)"
|
||||||
csproj_version="v$(cat BTCPayServer.Vault/Version.csproj | sed -n 's/.*<Version>\(.*\)<\/Version>.*/\1/p')"
|
csproj_version="v$(cat BTCPayServer.Vault/Version.csproj | sed -n 's/.*<Version>\(.*\)<\/Version>.*/\1/p')"
|
||||||
if [[ "$travis_version" != "$csproj_version" ]]; then
|
if [[ "$ci_version" != "$csproj_version" ]]; then
|
||||||
echo "The tagged version on travis ($travis_version) is different from the csproj ($csproj_version)"
|
echo "The tagged version on travis ($ci_version) is different from the csproj ($csproj_version)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -21,22 +29,6 @@ if ! [[ "$AZURE_STORAGE_CONNECTION_STRING" ]] || ! [[ "$AZURE_STORAGE_CONTAINER"
|
|||||||
fi
|
fi
|
||||||
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
|
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
|
||||||
az storage container create --name "$AZURE_STORAGE_CONTAINER" --public-access "container"
|
az storage container create --name "$AZURE_STORAGE_CONTAINER" --public-access "container"
|
||||||
sudo apt-get install -y ccrypt
|
|
||||||
|
|
||||||
sudo touch dist/secrets
|
|
||||||
sudo chmod 777 dist/secrets
|
|
||||||
echo "APPLE_DEV_ID_CERT='$APPLE_DEV_ID_CERT'" >> dist/secrets
|
|
||||||
echo "APPLE_DEV_ID_CERT_PASSWORD='$APPLE_DEV_ID_CERT_PASSWORD'" >> dist/secrets
|
|
||||||
echo "APPLE_ID='$APPLE_ID'" >> dist/secrets
|
|
||||||
echo "APPLE_ID_PASSWORD='$APPLE_ID_PASSWORD'" >> dist/secrets
|
|
||||||
echo "AZURE_STORAGE_CONNECTION_STRING='$AZURE_STORAGE_CONNECTION_STRING'" >> dist/secrets
|
|
||||||
echo "AZURE_STORAGE_CONTAINER='$AZURE_STORAGE_CONTAINER'" >> dist/secrets
|
|
||||||
echo "GITHUB_TOKEN='$GITHUB_TOKEN'" >> dist/secrets
|
|
||||||
echo "PGP_KEY='$PGP_KEY'" >> dist/secrets
|
|
||||||
echo "WINDOWS_CERT='$WINDOWS_CERT'" >> dist/secrets
|
|
||||||
echo "WINDOWS_CERT_PASSWORD='$WINDOWS_CERT_PASSWORD'" >> dist/secrets
|
|
||||||
|
|
||||||
sudo ccencrypt dist/secrets -K $ENC_KEY
|
|
||||||
|
|
||||||
for file in dist/*; do
|
for file in dist/*; do
|
||||||
BLOB_NAME="dist-$TRAVIS_BUILD_ID/$(basename -- $file)"
|
BLOB_NAME="dist-$TRAVIS_BUILD_ID/$(basename -- $file)"
|
||||||
0
Build/travis/makerelease.sh → Build/CI/makerelease.sh
Executable file → Normal file
0
Build/travis/makerelease.sh → Build/CI/makerelease.sh
Executable file → Normal file
0
Build/travis/pgpsign.sh → Build/CI/pgpsign.sh
Executable file → Normal file
0
Build/travis/pgpsign.sh → Build/CI/pgpsign.sh
Executable file → Normal file
Loading…
Reference in New Issue
Block a user