Compare commits
1 Commits
2026.03.07
...
2026.03.07
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0059c0d766 |
53
.gitea/workflows/update-version.yml
Normal file
53
.gitea/workflows/update-version.yml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
name: Update Plugin Version
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get release tag
|
||||||
|
id: get_tag
|
||||||
|
run: echo "TAG=${GITEA_REF#refs/tags/}" >> $GITEA_ENV
|
||||||
|
|
||||||
|
- name: Update version in plugin file
|
||||||
|
run: |
|
||||||
|
# Replace version in main plugin file (both header and constant)
|
||||||
|
sed -i "s/Version: {auto_update_value_on_deploy}/Version: ${{ env.TAG }}/" twilio-wp-plugin.php
|
||||||
|
sed -i "s/TWP_VERSION', '{auto_update_value_on_deploy}/TWP_VERSION', '${{ env.TAG }}/" twilio-wp-plugin.php
|
||||||
|
|
||||||
|
# Verify changes
|
||||||
|
grep "Version:" twilio-wp-plugin.php
|
||||||
|
grep "TWP_VERSION" twilio-wp-plugin.php
|
||||||
|
|
||||||
|
- name: Commit changes
|
||||||
|
run: |
|
||||||
|
git config --local user.email "action@gitea.com"
|
||||||
|
git config --local user.name "Gitea Action"
|
||||||
|
git add twilio-wp-plugin.php
|
||||||
|
git commit -m "Update version to ${{ env.TAG }}" || echo "No changes to commit"
|
||||||
|
git push || echo "Nothing to push"
|
||||||
|
|
||||||
|
- name: Create plugin zip
|
||||||
|
run: |
|
||||||
|
mkdir -p /tmp/twilio-wp-plugin
|
||||||
|
rsync -av --exclude=".git" --exclude=".gitea" --exclude="build" . /tmp/twilio-wp-plugin/
|
||||||
|
cd /tmp
|
||||||
|
zip -r $GITEA_WORK_DIR/twilio-wp-plugin.zip twilio-wp-plugin
|
||||||
|
|
||||||
|
- name: Upload zip to release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ gitea.event.release.upload_url }}
|
||||||
|
asset_path: twilio-wp-plugin.zip
|
||||||
|
asset_name: twilio-wp-plugin.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
@@ -76,7 +76,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|||||||
if (phoneNumbers.isNotEmpty) ...[
|
if (phoneNumbers.isNotEmpty) ...[
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
DropdownButtonFormField<String>(
|
DropdownButtonFormField<String>(
|
||||||
initialValue: selectedCallerId,
|
value: selectedCallerId,
|
||||||
decoration: const InputDecoration(
|
decoration: const InputDecoration(
|
||||||
labelText: 'Caller ID',
|
labelText: 'Caller ID',
|
||||||
isDense: true,
|
isDense: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user