v0.30.20 #31
Workflow file for this run
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
name: publish artifacts | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
publish-xcframework: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v3 | |
- name: Get Release | |
id: get_release | |
run: | | |
tag_name=$(gh release view --json tagName --jq .tagName) | |
echo "tag_name=${tag_name}" | tee -a $GITHUB_OUTPUT | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Download xcframework | |
run: gh release download -p CZiti.xcframework.zip | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Compute Checksum | |
id: calc_checksum | |
run: | | |
# checksum=$(swift package compute-checksum ./CZiti.xcframework.zip) | |
checksum=$(shasum -a 256 ./CZiti.xcframework.zip | cut -d " " -f1) | |
echo "checksum=${checksum}" | tee -a $GITHUB_OUTPUT | |
- name: Checkout Distribution Project | |
uses: actions/checkout@v3 | |
with: | |
repository: openziti/ziti-sdk-swift-dist | |
- name: Edit Package.swift | |
env: | |
VERS: ${{ steps.get_release.outputs.tag_name }} | |
CHKSM: ${{ steps.calc_checksum.outputs.checksum }} | |
run: | | |
echo "VERS=${VERS}; CHKSM=${CHKSM}" | |
sed "/let version = \"/s/.*/let version = \"${VERS}\"/; /let checksum = \"/s/.*/let checksum = \"${CHKSM}\"/" Package.swift > Package.swift.next | |
cat Package.swift.next | |
mv Package.swift.next Package.swift | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.19.x' | |
- name: Install Ziti CI | |
uses: openziti/ziti-ci@v1 | |
- name: Git Commit and Tag | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
gh_ci_key: ${{ secrets.GH_CI_KEY }} | |
ziti_ci_gpg_key: ${{ secrets.ZITI_CI_GPG_KEY }} | |
ziti_ci_gpg_key_id: ${{ secrets.ZITI_CI_GPG_KEY_ID }} | |
VERS: ${{ steps.get_release.outputs.tag_name }} | |
CHKSM: ${{ steps.calc_checksum.outputs.checksum }} | |
run: | | |
echo ${VERS} > version | |
$(go env GOPATH)/bin/ziti-ci configure-git | |
echo "Updating remote to ssh ziti-sdk-swift-dist" | |
git remote set-url origin [email protected]:openziti/ziti-sdk-swift-dist.git | |
git commit -m "set version = ${VERS}; set checksum = ${CHKSM}" Package.swift | |
git push | |
git tag -a ${VERS} -m "Release v${VERS}" | |
git push origin ${VERS} | |
publish-docs: | |
runs-on: ubuntu-latest | |
concurrency: ci-${{ github.ref }} | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Download Docs | |
run: gh release download -p ziti-sdk-swift-docs.tgz | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Extract Docs | |
run: | | |
mkdir ./docs | |
tar -xvzf ./ziti-sdk-swift-docs.tgz -C ./docs . | |
- name: Publish Docs | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: docs |