Manual Build #14
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
# This workflow is useful if you need to make a new release manually for testing purposes. | |
# | |
# This uploads the zip release bundle to `transfer.sh`. Where it will remain for 14 days. | |
# NOTE: This file can be overwritten so be cautious when downloading. | |
# The idea behind this process is to avoid publishing a test version to our Github Release page. | |
name: Manual Build | |
on: | |
workflow_dispatch: | |
inputs: | |
password: | |
required: true | |
# Don't allow multiple of the same job to run | |
concurrency: | |
group: "manual_build" | |
cancel-in-progress: false | |
jobs: | |
check_pass: | |
name: Check password | |
runs-on: ubuntu-latest | |
outputs: | |
is_allowed: ${{ steps.check.outputs.is_allowed }} | |
steps: | |
- id: check | |
run: | | |
password=${{ secrets.CI_PASSWORD }} | |
if [[ "${{ github.event.inputs.password }}" == "${password}" ]]; then | |
echo "is_allowed=true" >> $GITHUB_OUTPUT | |
else | |
echo "is_allowed=false" >> $GITHUB_OUTPUT | |
fi | |
test_release: | |
needs: check_pass | |
if: ${{ needs.check_pass.outputs.is_allowed == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: 🐳 Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: 🔨 Build Binaries | |
run: | | |
export VERSION=$(echo $(git describe --tags --always --match "v*") | sed 's/^v//') | |
export COMMIT=$(git log -1 --format='%H') | |
docker build -t seda-static -f ./dockerfiles/Dockerfile.build-static \ | |
--build-arg GIT_VERSION="$VERSION" \ | |
--build-arg GIT_COMMIT="$COMMIT" . | |
mkdir build | |
docker run --rm -v $(pwd)/build:/output seda-static cp -r /build/. /output/ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: build/ | |
overwrite: true |