modified Readme #3
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Test | |
| run: npm run test:ci | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: | | |
| ghcr.io/${{ github.repository }}:${{ github.ref_name }} | |
| ghcr.io/${{ github.repository }}:latest | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create ${{ github.ref_name }} \ | |
| --generate-notes \ | |
| --title "Modern Chord Charts ${{ github.ref_name }}" \ | |
| --notes "## Docker | |
| Pull and run with Docker Compose: | |
| \`\`\`yaml | |
| services: | |
| chord-charts: | |
| image: ghcr.io/${{ github.repository }}:${{ github.ref_name }} | |
| ports: | |
| - \"3000:3000\" | |
| volumes: | |
| - chord_data:/app/data | |
| restart: unless-stopped | |
| volumes: | |
| chord_data: | |
| \`\`\` | |
| Or pull directly: | |
| \`\`\`bash | |
| docker pull ghcr.io/${{ github.repository }}:${{ github.ref_name }} | |
| \`\`\` | |
| Song data persists in a named Docker volume (\`chord_data\`). The app is installable as a PWA from any browser on your local network." |