Skip to content

chore: use stable OS (#1862) #657

chore: use stable OS (#1862)

chore: use stable OS (#1862) #657

name: Latest Release
on:
push:
branches:
- "main"
paths-ignore:
- "**/*.png"
jobs:
latest-release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Generate Release Manifests
run: make generate-manifests IMAGE=envoyproxy/gateway-dev TAG=latest OUTPUT_DIR=release-artifacts
- name: Build egctl latest multiarch binaries
run: |
make build-multiarch BINS="egctl"
tar -zcvf egctl_latest_linux_amd64.tar.gz bin/linux/amd64/
tar -zcvf egctl_latest_linux_arm64.tar.gz bin/linux/arm64/
tar -zcvf egctl_latest_darwin_amd64.tar.gz bin/darwin/amd64/
tar -zcvf egctl_latest_darwin_arm64.tar.gz bin/darwin/arm64/
# Ignore the error when we delete the latest release, it might not exist.
# GitHub APIs take sometime to make effect, we should make sure before Recreate the Latest Release and Tag,
# tag and release all get deleted. So we sleep sometime after deleting tag and release to wait for it taking effect.
- name: Delete the Latest Release
continue-on-error: true
run: |
gh release delete latest --repo $GITHUB_REPOSITORY
sleep 4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository_owner }}/${{ github.event.repository.name }}
# Ignore the error when we delete the latest tag, it might not exist.
- name: Delete the Latest Tag
continue-on-error: true
run: |
gh api --method DELETE /repos/$GITHUB_REPOSITORY/git/refs/tags/latest
sleep 4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository_owner }}/${{ github.event.repository.name }}
- name: Recreate the Latest Release and Tag
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: true
tag_name: latest
files: |
release-artifacts/install.yaml
release-artifacts/quickstart.yaml
egctl_latest_linux_amd64.tar.gz
egctl_latest_linux_arm64.tar.gz
egctl_latest_darwin_amd64.tar.gz
egctl_latest_darwin_arm64.tar.gz
body: |
This is the "latest" release of **Envoy Gateway**, which contains the most recent commits from the main branch.
This release **might not be stable**.
It is only intended for developers wishing to try out the latest features in Envoy Gateway, some of which may not be fully implemented.
We use `v0.0.0-latest` as the latest chart version to install latest envoy-gateway:
```shell
helm install eg oci://docker.io/envoyproxy/gateway-helm --version v0.0.0-latest -n envoy-gateway-system --create-namespace
```
Try latest version of `egctl` with:
```shell
curl -Ls https://gateway.envoyproxy.io/get-egctl.sh | VERSION=latest bash
```
# Check if latest release and tag are created properly,
# if not, the workflow needs to report an error,
# let maintainers be aware of it and rerun it manually.
# After Recreate the Latest Release and Tag, we need to sleep some time to wait
# new tag and release are created before checking it.
- name: Check Latest Release and Tag
run: |
sleep 4
make latest-release-check