Skip to content

Update the GitHub Release Action #21

@caidanw

Description

@caidanw

Seems like it's not working, as I can't find the fonts.zip in the release files.

What we have currently seems to be diverging from the latest docs on the site.

Current:

name: Create a new GitHub release with the files

on:
  push:
    tags: ['*']
  workflow_dispatch:

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Create a ZIP archive from the fonts directory
        run: zip -r fonts.zip fonts
      - name: Create new release and upload fonts.zip
        uses: ncipollo/release-action@v1
        with:
          artifacts: 'fonts.zip'
          generateReleaseNotes: true

Docs:

name: Releases

on: 
  push:
    tags:
    - '*'

jobs:

  build:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
    - uses: actions/checkout@v4
    - uses: ncipollo/release-action@v1
      with:
        artifacts: "release.tar.gz,foo/*.txt"
        bodyFile: "body.md"

I'd like to take this opportunity to add a tiny bit of structure here.

  • Only trigger a new build on a tag starting with a v and following the semantic versioning pattern.
  • Fix the permissions to allow writing content.
  • Maybe we can push individual fonts as artifacts for those who only want one or two? Not sure about this yet, still need to explore more.

New:

name: Create a new GitHub release with the files

on:
  push:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+(-*)?'
  workflow_dispatch:

jobs:
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Create a ZIP archive from the fonts directory
        run: zip -r fonts.zip fonts
      - name: Create new release and upload fonts.zip
        uses: ncipollo/release-action@v1
        with:
          artifacts: 'fonts.zip'
          generateReleaseNotes: true

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions