Skip to content

Commit

Permalink
enable prerelease builds (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
scareything authored Jun 26, 2024
1 parent f615709 commit e181fd7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: CI
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
branches:
- main
- alpha
permissions:
contents: write

Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
draft-release:
runs-on: ubuntu-latest
needs: [ build-cziti ]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha')
steps:
- name: Checkout Project
uses: actions/checkout@v4
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
run: |
tag_name=$(gh release view --json tagName --jq .tagName)
echo "tag_name=${tag_name}" | tee -a $GITHUB_OUTPUT
tag_suffix=$(echo -n "${tag_name}" | cut -s -d '-' -f 2-)
dist_branch=$(echo -n ${tag_suffix:-main})
echo "dist_branch=${dist_branch}" | tee -a $GITHUB_OUTPUT
gh_pages_branch="gh-pages${tag_suffix:+-$tag_suffix}"
echo "gh_pages_branch=${gh_pages_branch}" | tee -a $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ github.token }}

Expand All @@ -35,6 +40,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: openziti/ziti-sdk-swift-dist
ref: ${{ steps.get_release.outputs.dist_branch }}

- name: Edit Package.swift
env:
Expand Down Expand Up @@ -95,3 +101,4 @@ jobs:
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs
branch: ${{ steps.get_release.outputs.gh_pages_branch }}

0 comments on commit e181fd7

Please sign in to comment.