Skip to content

Commit

Permalink
feature: test version detection
Browse files Browse the repository at this point in the history
  • Loading branch information
efraespada committed Oct 2, 2024
1 parent 5d0c65d commit a81ea31
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/push_check_publish_dry_run.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Push Test Check
name: Push Publish Dry Run Check

on:
push:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/tag_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tag Version on Push to Master

on:
push:
branches:
- develop

jobs:
tag_version:

runs-on: self-hosted

steps:
- uses: actions/checkout@v4

- name: Read version from pubspec.yml
id: read_version
run: |
VERSION=$(grep '^version: ' pubspec.yml | cut -d ' ' -f 2)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create tag
id: create_tag
run: |
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🟢 Test version" \
--body "${{ github.repository }}: v${{ env.VERSION }}" \
--url "https://github.com/landamessenger/object/actions/workflows/tag_version.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
--text_color "#FFFFFFFF"
- name: Tag pushed confirmation
run: echo "Tag v${{ env.VERSION }} created and pushed!"

0 comments on commit a81ea31

Please sign in to comment.