Skip to content

Commit

Permalink
ci: update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsukina-7mochi committed Jan 17, 2025
1 parent 5bdab88 commit ba82595
Showing 1 changed file with 55 additions and 10 deletions.
65 changes: 55 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,37 @@ on:
permissions:
contents: write

env:
build-artifact-name: build-artifact

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 3

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: leafo/gh-actions-lua@v10
with:
lua-version: 5.4

- name: Build
run: |
make clean
make build
- uses: actions/upload-artifact@v4
with:
name: ${{ env.build-artifact-name }}
path: dist
retention-days: 1
overwrite: true

release:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 3

Expand All @@ -28,18 +57,14 @@ jobs:
}'

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
fetch-depth: 0
name: ${{ env.build-artifact-name }}
path: dist

- uses: leafo/gh-actions-lua@v10
- uses: actions/checkout@v4
with:
lua-version: 5.4

- name: Build
run: |
make clean
make build-${{ fromJSON(matrix.target).name }}
fetch-depth: 0

- uses: ./.github/actions/use-script-manifest
id: manifest
Expand Down Expand Up @@ -80,4 +105,24 @@ jobs:
FILENAME: ${{ fromJSON(matrix.target).output }}
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${{ env.tag-name }}" -t "${{ env.release-name }}" "$FILENAME"
gh release create "${{ env.tag-name }}" -t "${{ env.release-name }}"
deploy-pages:
needs: build
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
timeout-minutes: 3
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Build

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: ${{ env.build-artifact-name }}

0 comments on commit ba82595

Please sign in to comment.