Add stats window for tracking session and lifetime download/upload/ratio #37
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: CI/CD | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
name: Build bundle | |
runs-on: macos-latest | |
env: | |
CONFIGURATION: Release | |
PROJECT: Dreadnought.xcodeproj | |
SCHEME: Dreadnought | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
[[ $GITHUB_REF_TYPE = "tag" ]] && MARKETING_VERSION=$GITHUB_REF_NAME || MARKETING_VERSION=$(git rev-parse --short HEAD) | |
echo "Building $MARKETING_VERSION ($GITHUB_RUN_NUMBER)" | |
agvtool new-version -all $GITHUB_RUN_NUMBER | |
agvtool new-marketing-version $MARKETING_VERSION | |
xcodebuild clean build analyze -project $PROJECT -scheme $SCHEME -configuration $CONFIGURATION -derivedDataPath build | xcpretty && exit ${PIPESTATUS[0]} | |
- name: Compress | |
run: | | |
mkdir -p ./artifacts | |
brew install gnu-tar | |
export PATH="$(brew --prefix gnu-tar)/libexec/gnubin:$PATH" | |
tar -czf ./artifacts/Dreadnought.tar.gz -C ./build/Build/Products/$CONFIGURATION/ Dreadnought.app | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-build | |
path: | | |
./artifacts | |
deploy: | |
name: Attach bundle to release | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: ./artifacts | |
name: release-build | |
- name: Attach to GitHub release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ./artifacts/*.tar.gz |