Skip to content

Datepicker label height fix (#1840) #700

Datepicker label height fix (#1840)

Datepicker label height fix (#1840) #700

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
tokensversion: ${{ steps.output-tokens-version.outputs.tokensversion }}
tokensshoulddeploy: ${{ contains(fromJson(steps.changesets.outputs.publishedPackages).*.name, '@sebgroup/green-tokens') }}
steps:
- name: Get token
id: get_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GREEN_BOT_APP_ID }}
private-key: ${{ secrets.GREEN_BOT_PRIVATE_KEY }}
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node.js LTS
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile --silent
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn changeset:publish
env:
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Output green-tokens versions
if: ${{ contains(fromJson(steps.changesets.outputs.publishedPackages).*.name, '@sebgroup/green-tokens') }}
id: output-tokens-version
run: echo "tokensversion=$(jq -r '.[] | select(.name=="@sebgroup/green-tokens").version' <<< '${{ steps.changesets.outputs.publishedPackages }}')" >> "$GITHUB_OUTPUT"
- name: Upload IOS artifacts
if: ${{ contains(fromJson(steps.changesets.outputs.publishedPackages).*.name, '@sebgroup/green-tokens') }}
uses: actions/upload-artifact@v4
with:
name: iostokens
path: ./dist/libs/tokens/ios/*
deployiostokens:
name: Deploy Swift Package
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
env:
CI_COMMIT_MESSAGE: Continuous Integration Deployment ${{ github.sha }}}
needs: release
if: ${{ needs.release.outputs.tokensshoulddeploy == 'true' }}
steps:
- name: Get token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GREEN_BOT_APP_ID }}
private-key: ${{ secrets.GREEN_BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
green-tokens-ios
green
- name: Checkout
uses: actions/checkout@v4
with:
repository: seb-oss/green-tokens-ios
ref: main
token: ${{ steps.app-token.outputs.token }}
- name: Get artifact
uses: actions/download-artifact@v4
with:
name: iostokens
- name: Get GitHub App User ID
id: get-user-id
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
- run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
- name: Push changes
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
git add .
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push
git tag -a ${{ needs.release.outputs.tokensversion }} -m "Version ${{ needs.release.outputs.tokensversion }} of the Green Tokens Package for Swift."
git push origin ${{ needs.release.outputs.tokensversion }}