Skip to content

Remove email from LICENSE. Match LICENSE.md to LICENSE. (#112) #10

Remove email from LICENSE. Match LICENSE.md to LICENSE. (#112)

Remove email from LICENSE. Match LICENSE.md to LICENSE. (#112) #10

name: Create release
on:
push:
branches: [main]
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: macos-11.0
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch all tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Bump version
run: |
chmod +x ./scripts/bump-version.sh
./scripts/bump-version.sh
# - name: Changelog
# uses: scottbrenner/generate-changelog-action@master
# id: Changelog
# env:
# REPO: ${{ github.repository }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Restore SPM Cache
uses: actions/cache@v1
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Resolve dependencies
run: |
brew bundle
bundle
- name: Release XCFrameworks
run: |
chmod +x ./scripts/xcframeworks.sh
./scripts/xcframeworks.sh
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: RxOptional ${{ env.RELEASE_VERSION }}
# body: |
# ${{ steps.Changelog.outputs.changelog }}
draft: false
prerelease: false
- name: Upload XCFramework
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./RxOptional.xcframework.zip
asset_name: RxOptional.xcframework.zip
asset_content_type: application/zip
- name: Deploy to Cocoapods
run: |
set -eo pipefail
export RELEASE_VERSION="$(git describe --abbrev=0 | tr -d '\n')"
RELEASE_VERSION=${RELEASE_VERSION:1}
pod lib lint --allow-warnings
pod trunk push --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}