Temporary release workflow for releasing Flutter

This commit is contained in:
Pascal Jufer 2023-10-29 10:41:54 +01:00
parent 5f0007ce9a
commit 49dee5fc46
No known key found for this signature in database

View file

@ -4,6 +4,7 @@ on:
push: push:
tags: tags:
- 'v*' - 'v*'
workflow_dispatch: {}
jobs: jobs:
release: release:
@ -24,38 +25,38 @@ jobs:
with: with:
node-registry: https://registry.npmjs.org node-registry: https://registry.npmjs.org
- name: Generate changelog file # - name: Generate changelog file
uses: rhysd/changelog-from-release/action@v3 # uses: rhysd/changelog-from-release/action@v3
with: # with:
github_token: ${{ secrets.GITHUB_TOKEN }} # github_token: ${{ secrets.GITHUB_TOKEN }}
file: packages/iconoir-flutter/CHANGELOG.md # file: packages/iconoir-flutter/CHANGELOG.md
commit: false # commit: false
args: -d=false # args: -d=false
- name: Build - name: Build
run: pnpm run build run: pnpm run build
- name: Prepare packages # - name: Prepare packages
run: pnpm run prepublish-all # run: pnpm run prepublish-all
env: # env:
TAG_NAME: ${{ github.ref_name }} # TAG_NAME: ${{ github.ref_name }}
- name: Commit release # - name: Commit release
uses: stefanzweifel/git-auto-commit-action@v5 # uses: stefanzweifel/git-auto-commit-action@v5
with: # with:
commit_message: Release Version ${{ github.ref_name }} # commit_message: Release Version ${{ github.ref_name }}
branch: main # branch: main
- name: Update tag # - name: Update tag
run: | # run: |
git -c user.email="actions@github.com" -c user.name="GitHub Actions" tag -fa ${{ github.ref_name }} -m "${{ github.ref_name }}" # git -c user.email="actions@github.com" -c user.name="GitHub Actions" tag -fa ${{ github.ref_name }} -m "${{ github.ref_name }}"
git push -f origin ${{ github.ref_name }} # git push -f origin ${{ github.ref_name }}
- name: Publish packages # - name: Publish packages
run: pnpm -r publish --access public # run: pnpm -r publish --access public
env: # env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true # NPM_CONFIG_PROVENANCE: true
- name: Publish Flutter - name: Publish Flutter
uses: k-paxian/dart-package-publisher@v1.6 uses: k-paxian/dart-package-publisher@v1.6
@ -63,13 +64,13 @@ jobs:
credentialJson: ${{ secrets.PUB_CREDENTIAL_JSON }} credentialJson: ${{ secrets.PUB_CREDENTIAL_JSON }}
relativePath: ./packages/iconoir-flutter relativePath: ./packages/iconoir-flutter
- name: Trigger Website Workflow # - name: Trigger Website Workflow
uses: actions/github-script@v6 # uses: actions/github-script@v6
with: # with:
script: | # script: |
github.rest.actions.createWorkflowDispatch({ # github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner, # owner: context.repo.owner,
repo: context.repo.repo, # repo: context.repo.repo,
workflow_id: 'website.yaml', # workflow_id: 'website.yaml',
ref: 'main', # ref: 'main',
}) # })