Skip to content

Commit

Permalink
Add Swift release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mimartin12 committed Oct 5, 2023
1 parent 88264f2 commit bda3ce0
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/release-swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ on:
- Dry Run

jobs:
setup:
name: Setup
validate:
name: Validate Branch - Set Version
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout repo
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
Expand All @@ -33,12 +35,19 @@ jobs:
exit 1
fi
- name: Check release version
- name: Get version
id: version
run: |
VERSION=$(grep -o '^version = ".*"' crates/bitwarden/Cargo.toml | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+")
echo "version=$VERSION" >> $GITHUB_OUTPUT
github-release:
name: GitHub Release
runs-on: ubuntu-22.04
needs: validate
env:
_PKG_VERSION: ${{ needs.validate.outputs.version }}
steps:
- name: Download all Release artifacts
uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f
with:
Expand All @@ -50,13 +59,11 @@ jobs:
- name: Create release
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0
env:
PKG_VERSION: ${{ steps.version.outputs.version }}
with:
artifacts: "packages/BitwardenFFI-${{ env.PKG_VERSION }}.xcframework"
artifacts: "packages/BitwardenFFI-${{ env._PKG_VERSION }}.xcframework"
commit: ${{ github.sha }}
tag: BitwardenFFI-v${{ env.PKG_VERSION }}
name: BitwardenFFI v${{ env.PKG_VERSION }}
tag: BitwardenFFI-v${{ env._PKG_VERSION }}
name: BitwardenFFI v${{ env._PKG_VERSION }}
body: "<insert release notes here>"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true

0 comments on commit bda3ce0

Please sign in to comment.