diff --git a/.github/workflows/bioconda.yml b/.github/workflows/bioconda.yml index 5062372db..9192d8fac 100644 --- a/.github/workflows/bioconda.yml +++ b/.github/workflows/bioconda.yml @@ -28,6 +28,8 @@ env: jobs: publish-to-bioconda: + if: "!github.event.release.prerelease" + name: "Publish to Bioconda" runs-on: ubuntu-22.04 diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index e2d5306ad..49c134732 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -3,7 +3,7 @@ name: cli on: push: - branches: ['master', 'staging-cli', 'release-cli'] + branches: [ 'master', 'staging-cli', 'release-cli' ] pull_request: @@ -102,8 +102,20 @@ jobs: cache-v1-cargo-${{ runner.os }}-${{ matrix.arch }}- cache-v1-cargo-${{ runner.os }}- + - name: "Install deps" + run: | + mkdir -p "${HOME}/bin" + curl -fsSL "https://github.com/TomWright/dasel/releases/download/v1.24.3/dasel_linux_amd64" -o "${HOME}/bin/dasel" && chmod +x "${HOME}/bin/dasel" + - name: "Prepare .env file" run: | + export PATH="${PATH}:${HOME}/bin" + + version=$(dasel select -p toml -s ".package.version" -f "packages_rs/nextclade/Cargo.toml") + if [[ "$version" =~ (rc|beta|alpha) ]]; then + export DATA_FULL_DOMAIN="https://data.master.clades.nextstrain.org/v3" + fi + cp .env.example .env sed -i -e "s|OSXCROSS_URL=http://example.com/osxcross/osxcross.tar.xz|OSXCROSS_URL=${{ secrets.OSXCROSS_URL }}|g" .env sed -i -e "s|DATA_FULL_DOMAIN=https://data.master.clades.nextstrain.org/v3|DATA_FULL_DOMAIN=${DATA_FULL_DOMAIN}|g" .env @@ -251,28 +263,28 @@ jobs: chmod +x ./.out/* JOBS=2 ./tests/run-smoke-tests ./.out/nextclade-x86_64-unknown-linux-gnu -# run-smoke-tests-mac: -# name: "Run smoke tests (mac)" -# needs: [ build-cli ] -# runs-on: macos-latest -# -# steps: -# - name: "Checkout code" -# uses: actions/checkout@v3 -# with: -# fetch-depth: 1 -# submodules: true -# -# - name: "Download build artifacts" -# uses: actions/download-artifact@v3 -# with: -# name: "out" -# path: ".out" -# -# - name: "Run smoke tests (mac)" -# run: | -# chmod +x ./.out/* -# ./tests/run-smoke-tests ./.out/nextclade-x86_64-apple-darwin + # run-smoke-tests-mac: + # name: "Run smoke tests (mac)" + # needs: [ build-cli ] + # runs-on: macos-latest + # + # steps: + # - name: "Checkout code" + # uses: actions/checkout@v3 + # with: + # fetch-depth: 1 + # submodules: true + # + # - name: "Download build artifacts" + # uses: actions/download-artifact@v3 + # with: + # name: "out" + # path: ".out" + # + # - name: "Run smoke tests (mac)" + # run: | + # chmod +x ./.out/* + # ./tests/run-smoke-tests ./.out/nextclade-x86_64-apple-darwin run-linux-distros-test: @@ -384,8 +396,7 @@ jobs: - name: "Install deploy dependencies" run: | mkdir -p "${HOME}/bin" - curl -fsSL "https://github.com/TomWright/dasel/releases/download/v1.24.3/dasel_linux_amd64" -o "${HOME}/bin/dasel" - chmod +x "${HOME}/bin/dasel" + curl -fsSL "https://github.com/TomWright/dasel/releases/download/v1.24.3/dasel_linux_amd64" -o "${HOME}/bin/dasel" && chmod +x "${HOME}/bin/dasel" - name: "Login to Docker Hub" uses: docker/login-action@v2 diff --git a/docker/docker-prod-scratch.dockerfile b/docker/docker-prod-scratch.dockerfile index 94ed85b6d..1a44d054b 100644 --- a/docker/docker-prod-scratch.dockerfile +++ b/docker/docker-prod-scratch.dockerfile @@ -1,6 +1,4 @@ FROM scratch COPY .out/nextclade-x86_64-unknown-linux-musl /nextclade - -RUN set -eux \ -&& ln -s /usr/bin/nextclade /usr/bin/nextalign +COPY .out/nextclade-x86_64-unknown-linux-musl /nextalign diff --git a/scripts/publish_github b/scripts/publish_github index 1c29b6fb6..d31128864 100755 --- a/scripts/publish_github +++ b/scripts/publish_github @@ -70,11 +70,11 @@ prerelease_flag=${release_type:+--prerelease} ( if [ -z "$release_type" ]; then ./scripts/extract-release-notes.py CHANGELOG.md + cat docs/assets/release-instructions.md else cat docs/assets/prerelease-warning.md + echo "For changes compared to the previous final release version, please refer to \"Unreleased\" section in [CHANGELOG.md](https://github.com/nextstrain/nextclade/blob/${git_sha}/CHANGELOG.md)" fi - git cliff --current - cat docs/assets/release-instructions.md ) | gh release create \ "${version}" \