-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.76 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This is a basic workflow to help you get started with Actions
name: 🚀 Publish Tapsell Mediation Flutter Release TAG
# Controls when the workflow will run
on: push
jobs:
build:
name: ⚙️ Release
runs-on: ubuntu-latest
steps:
- name: 🛠️ Get Current Date
id: date
run: |
echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: 🔃 Checkout branch "master"
uses: actions/checkout@v4
with:
ref: 'master'
- name: 🔖 Get Flutter Version
id: version
run: |
TAG_VERSION=$(cat pubspec.yaml | grep "version:.*" | awk '{ print $2}')
echo "$TAG_VERSION"
echo "::set-output name=tag_name::v${TAG_VERSION}"
echo "::set-output name=release_name::TapsellMediation-Flutter-v${TAG_VERSION:-Package}"
- name: 📢 Prepare Release Notes
id: release_notes
run: |
awk '/^# / {s++} s == 1 {print}' CHANGELOG.md > /tmp/release_notes.md
echo "::set-output name=path::/tmp/release_notes.md"
- name: 🛎️ Create Release + TAG
id: release-snapshot
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.tag_name }}
name: ${{ steps.version.outputs.release_name }}
body: ${{ steps.date.outputs.date }} - See [This doc](https://docs.tapsell.ir/mediation/flutter) to implement the Tapsell SDK into your app.
body_path: ${{ steps.release_notes.outputs.path }}
target_commitish: ${{ github.sha }}
draft: false
prerelease: false
generate_release_notes: true
files: |
CHANGELOG.md
README.md