Skip to content

Feature/swift concurrency #4

Feature/swift concurrency

Feature/swift concurrency #4

Workflow file for this run

name: "🏷️ Tag on PR merge"
on:
workflow_dispatch:
pull_request:
types: [closed]
branches:
- main
jobs:
run_on_merge:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: "📦 Checkout"
uses: actions/checkout@v4
- name: "🔍 Find the current version"
id: find_version
run: |
RELEASE_VERSION=$(sed -n '2p' Configurations/Project-Shared.xcconfig | cut -d '=' -f2 | tr -d ' ')
echo "Found version: v$RELEASE_VERSION"
echo "NEW_RELEASE_VERSION=v$RELEASE_VERSION" >> $GITHUB_ENV
- name: "🔑 Set up GPG"
id: setup_gpg
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
echo "default-key ${{ env.GPG_KEY_ID }}" > $HOME/.gnupg/gpg.conf
echo "pinentry-mode loopback" >> $HOME/.gnupg/gpg.conf
git config --global user.signingkey ${{ env.GPG_KEY_ID }}
git config --global commit.gpgsign true
- name: "🏷️ Create a signed tag"
id: create_tag
env:
NEW_RELEASE_VERSION: ${{ steps.find_version.outputs.NEW_RELEASE_VERSION }}
run: |
git config user.name "surpher"
git config user.email "${{ secrets.GPG_EMAIL }}"
git tag -s -a ${{ env.NEW_RELEASE_VERSION }} -m "Release ${{ env.NEW_RELEASE_VERSION }}"
git push origin ${{ env.NEW_RELEASE_VERSION }}
- name: "🚀 Create a release"
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
NEW_RELEASE_VERSION: ${{ steps.find_version.outputs.NEW_RELEASE_VERSION }}
with:
tag_name: ${{ env.NEW_RELEASE_VERSION }}
release_name: "Release: ${{ env.NEW_RELEASE_VERSION }}"
body: "Release ${{ env.NEW_RELEASE_VERSION }}"
draft: false
prerelease: false