Skip to content

chore(deps): bump lycheeverse/lychee-action from 2.3.0 to 2.4.0 (#87) #105

chore(deps): bump lycheeverse/lychee-action from 2.3.0 to 2.4.0 (#87)

chore(deps): bump lycheeverse/lychee-action from 2.3.0 to 2.4.0 (#87) #105

Workflow file for this run

name: publish
on:
pull_request:
branches:
- main
paths:
- "CHANGELOG.md"
push:
branches:
- main
tags:
- '[1-9]+.[0-9]+.[0-9]+*'
jobs:
publish-dry-run:
name: 📝 Publish dry run
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.ref_type == 'branch' && github.event_name == 'pull_request' && !github.event.pull_request.merged
steps:
- name: Checks-out repository
uses: actions/checkout@v4.2.2
- name: Setup Dart
uses: dart-lang/setup-dart@v1.6.0
- name: Install Dependencies
run: dart pub get --no-example
- name: Publish - dry run
run: dart pub publish --dry-run
check-version:
name: 💡 Check version
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
timeout-minutes: 15
steps:
- name: Checks-out repository
uses: actions/checkout@v4.2.2
- name: Get tag
id: get_tag
run: echo TAG=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV
- name: Read pubspec.yaml version
uses: KJ002/read-yaml@1.6
id: pubspec
with:
file: "pubspec.yaml"
key-path: '["version"]'
- name: Show detected tag and version
run: |
echo "Tag from github ref.: ${{ env.TAG }}!"
echo "Version from pubspec: ${{ steps.pubspec.outputs.data }}!"
- name: Delete tag if version is not same as tag
uses: dev-drprasad/delete-tag-and-release@v1.1
if: ${{ steps.pubspec.outputs.data != env.TAG }}
with:
tag_name: ${{ env.TAG }}
delete_release: false
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Cancel workflow if tag is not same as version
uses: andymckay/cancel-action@0.5
if: ${{ steps.pubspec.outputs.data != env.TAG }}
- name: Sleep for 10 seconds
run: sleep 10s
shell: bash
publish:
name: 📝 Publish to pub.dev
needs: check-version
permissions:
id-token: write
if: ${{ github.repository_owner == 'tsinis' && github.actor == 'tsinis' }}
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1