Create tag #12
This file contains 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: Create tag | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- dist/dist.css | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: The branch, tag or SHA to checkout. | |
required: false | |
jobs: | |
tag: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
- name: Generate GitHub App token | |
uses: actions/create-github-app-token@v1 | |
id: github-app-token | |
with: | |
app-id: ${{ secrets.GHA_ACTOR_APP_ID }} | |
private-key: ${{ secrets.GHA_ACTOR_PRIVATE_KEY }} | |
- name: Automated version bump | |
id: version-bump | |
uses: phips28/gh-action-bump-version@v11.0.7 | |
with: | |
tag-prefix: '' | |
commit-message: Release version {{version}} | |
env: | |
# From https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#http-based-git-access-by-an-installation | |
GITHUB_ACTOR: x-access-token | |
GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }} | |
- name: Remove 'v' prefix from version-bump tag | |
id: version-bump-without-v-prefix | |
run: echo "value=$(echo ${{ steps.version-bump.outputs.newTag }} | tr -d v)" >> $GITHUB_OUTPUT | |
- name: Checkout gh-pages | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- name: Generate release ext.json file | |
uses: marc-sensenich/sn-extension-description-action@v1 | |
with: | |
identifier: com.marc-sensenich.sn-nord-theme | |
name: Nord | |
description: An arctic, north-bluish clean and elegant Standard Notes theme. | |
content_type: SN|Theme | |
area: themes | |
version: ${{ steps.version-bump-without-v-prefix.outputs.value }} | |
url: https://cdn.jsdelivr.net/gh/marc-sensenich/sn-nord-theme@${{ steps.version-bump.outputs.newTag }}/dist/dist.css | |
download_url: https://github.com/marc-sensenich/sn-nord-theme/archive/refs/tags/${{ steps.version-bump.outputs.newTag }}.zip | |
latest_url: https://marc-sensenich.github.io/sn-nord-theme/ext.json | |
marketing_url: https://github.com/marc-sensenich/sn-nord-theme#readme | |
dock_icon_background_color: '#88C0D0' | |
dock_icon_foreground_color: '#88C0D0' | |
dock_icon_border_color: '#88C0D0' | |
output_path: gh-pages/ext.json | |
- name: Update gh-pages with latest ext.json file | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "Release version ${{ steps.version-bump.outputs.newTag }}" | |
file_pattern: ext.json | |
repository: gh-pages |