Repository navigation
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update publiccode.yml on release | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-publiccode: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: Update version and date in publiccode.yml | |
| run: | | |
| VERSION="${{ github.event.release.tag_name }}" | |
| DATE=$(date +%Y-%m-%d) | |
| sed -i "s/^softwareVersion:.*/softwareVersion: ${VERSION}/" publiccode.yml | |
| sed -i "s/^releaseDate:.*/releaseDate: ${DATE}/" publiccode.yml | |
| - name: Commit and push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add publiccode.yml | |
| git diff --cached --quiet && exit 0 | |
| git commit -m "chore: update publiccode.yml to ${{ github.event.release.tag_name }}" | |
| git push |