Create preview channel
This commit is contained in:
parent
88be4fe77e
commit
a61f3b715b
9 changed files with 64 additions and 37 deletions
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
|
@ -79,9 +79,22 @@ jobs:
|
|||
clean: false
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Validate version
|
||||
- name: Check that tag version matches package version
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
run: script/validate-version
|
||||
run: |
|
||||
set -eu
|
||||
crate_version=$(script/get-crate-version zed)
|
||||
tag_version=$(echo $GITHUB_REF_NAME | sed -e 's/^v//' -e 's/-pre$//')
|
||||
if [[ $tag_version != $crate_version ]]; then
|
||||
echo "zed crate version $crate_version does not match git tag version $tag_version"
|
||||
exit 1
|
||||
fi
|
||||
echo "Publishing zed version: $crate_version"
|
||||
|
||||
- name: Enable the preview channel
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-pre') }}
|
||||
run: |
|
||||
echo "ZED_PREVIEW_CHANNEL=1 >> $GITHUB_ENV
|
||||
|
||||
- name: Create app bundle
|
||||
run: script/bundle
|
||||
|
@ -98,6 +111,7 @@ jobs:
|
|||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
with:
|
||||
draft: true
|
||||
prerelease: ${{ endsWith(github.ref, '-pre') }}
|
||||
files: target/release/Zed.dmg
|
||||
overwrite: true
|
||||
body: ""
|
||||
|
|
10
.github/workflows/publish_collab_image.yml
vendored
10
.github/workflows/publish_collab_image.yml
vendored
|
@ -31,14 +31,14 @@ jobs:
|
|||
- name: Check that tag version matches package version
|
||||
run: |
|
||||
set -eu
|
||||
package_version=$(cargo metadata --no-deps --format-version=1 | jq --raw-output '.packages[] | select(.name == "collab") | .version')
|
||||
crate_version=$(script/get-crate-version collab)
|
||||
tag_version=$(echo $GITHUB_REF_NAME | sed -e 's/collab-v//')
|
||||
if [[ $tag_version != $package_version ]]; then
|
||||
echo "collab package version $package_version does not match git tag version $tag_version"
|
||||
if [[ $tag_version != $crate_version ]]; then
|
||||
echo "collab crate version $crate_version does not match git tag version $tag_version"
|
||||
exit 1
|
||||
fi
|
||||
echo "Publishing image version: $package_version"
|
||||
echo "COLLAB_VERSION=$package_version" >> $GITHUB_ENV
|
||||
echo "Publishing collab version: $crate_version"
|
||||
echo "COLLAB_VERSION=$crate_version" >> $GITHUB_ENV
|
||||
|
||||
- name: Build docker image
|
||||
run: docker build . --tag registry.digitalocean.com/zed/collab:v${COLLAB_VERSION}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue