diff --git a/.github/dependabot.yml b/.github/dependabot.yml index be27bdc..1094dfd 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,7 +13,8 @@ updates: - package-ecosystem: 'github-actions' directory: '/' schedule: - interval: 'monthly' + interval: 'weekly' + target-branch: 'development' groups: github-actions: patterns: diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index f08b3b4..91799b7 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,3 +1,4 @@ +--- name: Checks on: @@ -5,14 +6,16 @@ on: branches: - development - main + - master pull_request: branches: - development - main + - master + +permissions: + contents: read jobs: checks: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - uses: Screenly/edge-apps-actions/checks@v1 + uses: Screenly/edge-apps-actions/.github/workflows/checks.yml@v26.10.2 diff --git a/.github/workflows/initialize-edge-app.yml b/.github/workflows/initialize-edge-app.yml index 48932f3..391eb5d 100644 --- a/.github/workflows/initialize-edge-app.yml +++ b/.github/workflows/initialize-edge-app.yml @@ -21,21 +21,17 @@ on: required: true type: string +permissions: + contents: read + run-name: Initializing ${{ inputs.edge_app_name }} in ${{ inputs.environment }} jobs: initialize: - name: Initializing ${{ inputs.edge_app_name }} in ${{ inputs.environment }} - runs-on: ubuntu-latest - environment: ${{ inputs.environment }} - steps: - - uses: actions/checkout@v7 - with: - ref: ${{ inputs.environment == 'production' && 'main' || github.ref }} - - uses: Screenly/edge-apps-actions/initialize@f4ccd2bd50db5fb0a5147d287ac03cafe552d29b - with: - screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN }} - edge_app_name: ${{ inputs.edge_app_name }} - edge_app_title: ${{ inputs.edge_app_title }} - environment: ${{ inputs.environment }} - edge_app_id: ${{ secrets.EDGE_APP_ID || (inputs.environment == 'production' && vars.PRODUCTION_EDGE_APP_ID || (inputs.environment == 'stage' && vars.STAGE_EDGE_APP_ID)) }} + uses: Screenly/edge-apps-actions/.github/workflows/initialize.yml@v26.10.2 + with: + environment: ${{ inputs.environment }} + edge_app_name: ${{ inputs.edge_app_name }} + edge_app_title: ${{ inputs.edge_app_title }} + secrets: + SCREENLY_API_TOKEN: ${{ secrets.SCREENLY_API_TOKEN }} diff --git a/.github/workflows/update-edge-app.yml b/.github/workflows/update-edge-app.yml index 4c5d028..363b425 100644 --- a/.github/workflows/update-edge-app.yml +++ b/.github/workflows/update-edge-app.yml @@ -5,36 +5,18 @@ on: workflow_dispatch: push: branches: - - development - main + - master + tags: + - 'v[0-9]*' -run-name: Updating Simple Timer App in ${{ github.event_name == 'workflow_dispatch' && 'stage' || (github.ref == 'refs/heads/main' && 'production' || 'stage') }} +permissions: + contents: read -jobs: - deploy-stage: - name: Updating Simple Timer App in stage - runs-on: ubuntu-latest - if: (github.event_name == 'push' && github.ref == 'refs/heads/development') || github.event_name == 'workflow_dispatch' - environment: stage - steps: - - uses: actions/checkout@v7 - - uses: Screenly/edge-apps-actions/update@f4ccd2bd50db5fb0a5147d287ac03cafe552d29b - with: - screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN }} - environment: stage - delete_missing_settings: 'true' - edge_app_id: ${{ secrets.EDGE_APP_ID || vars.STAGE_EDGE_APP_ID }} +run-name: Updating Simple Timer App in ${{ (github.event_name == 'push' && !github.event.deleted && startsWith(github.ref, 'refs/tags/v')) && 'production' || 'stage' }} - deploy-production: - name: Updating Simple Timer App in production - runs-on: ubuntu-latest - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - environment: production - steps: - - uses: actions/checkout@v7 - - uses: Screenly/edge-apps-actions/update@f4ccd2bd50db5fb0a5147d287ac03cafe552d29b - with: - screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN }} - environment: production - delete_missing_settings: 'true' - edge_app_id: ${{ secrets.EDGE_APP_ID || vars.PRODUCTION_EDGE_APP_ID }} +jobs: + update: + uses: Screenly/edge-apps-actions/.github/workflows/update.yml@v26.10.2 + secrets: + SCREENLY_API_TOKEN: ${{ secrets.SCREENLY_API_TOKEN }} diff --git a/README.md b/README.md index 557b483..4fab63f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ +[![Version](https://img.shields.io/github/v/release/Screenly/simple-timer-app)](https://github.com/Screenly/simple-timer-app/releases/latest) + # Screenly Simple Timer App +![Simple Timer App Preview](/screenshots/1920x1080.webp) + ## Getting Started ```bash @@ -16,6 +20,22 @@ bun run deploy screenly edge-app instance create ``` +### Releasing + +Pushes to `main` start a stage deploy, which waits for approval. To release to production, tag a commit on `main` and push the tag (the workflow refuses tags not on `main`); the production deploy also waits for approval: + +```bash +git checkout main && git pull +git tag v26.10.0 +git push origin v26.10.0 +``` + +Then publish a GitHub Release whose notes list the pull requests merged since the previous release. Add `--draft` to review the notes before publishing: + +```bash +gh release create v26.10.0 --verify-tag --generate-notes --title v26.10.0 +``` + ## Configuration The app accepts the following settings via `screenly.yml`: