Skip to content

Commit

Permalink
Fix build errors and order
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanlangston committed Jan 2, 2024
1 parent e2c8618 commit e10f081
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/DeployPages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
outputs:
datetime: ${{ steps.set_datetime.outputs.datetime }}
steps:
- name: Set current datetime output variable
id: set_datetime
run: echo "datetime=$(date +"%Y%m%d%H%M%S")" >> "$GITHUB_OUTPUT"
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Checkout
Expand Down Expand Up @@ -87,7 +92,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
path: '${{ github.workspace }}/src/asteroids-website/build'
- name: Build Svelte-Compressed
- name: Build Svelte compressed
run: |
cd ${{ github.workspace }}/src/asteroids-website
npm run build-compressed
Expand All @@ -99,7 +104,7 @@ jobs:

deploy-github-pages:
runs-on: ubuntu-latest
needs: build
needs: [build]
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
Expand All @@ -113,7 +118,7 @@ jobs:

deploy-itchio:
runs-on: ubuntu-latest
needs: deploy-github-pages
needs: [build, deploy-github-pages]
permissions:
contents: write
steps:
Expand All @@ -122,28 +127,25 @@ jobs:
with:
name: github-pages
path: asteroids-compressed
- name: Set current datetime
id: set_datetime
run: echo "datetime=$(date +"%Y%m%d%H%M%S")" >> "$GITHUB_OUTPUT"
- name: Create compressed ZIP
run: |
cd ../asteroids-compressed
cd ./asteroids-compressed
mkdir ./asteroids-compressed
tar -xvf ./artifact-compressed.tar -C ./asteroids-compressed
zip -r ../asteroids-v${{ steps.set_datetime.outputs.datetime }}.zip ./asteroids/
zip -r ../asteroids-v${{ needs.build.outputs.datetime }}.zip ./asteroids/
- uses: manleydev/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.ITCHIO_API_KEY }}
CHANNEL: html
VERSION: v${{ steps.set_datetime.outputs.datetime }}
VERSION: v${{ needs.build.outputs.datetime }}
ITCH_GAME: asteroids
ITCH_USER: dylanlangston
PACKAGE: ./asteroids-v${{ steps.set_datetime.outputs.datetime }}.zip
PACKAGE: ./asteroids-v${{ needs.build.outputs.datetime }}.zip


release:
runs-on: ubuntu-latest
needs: deploy-itchio
needs: [build, deploy-github-pages]
permissions:
contents: write
steps:
Expand All @@ -152,26 +154,23 @@ jobs:
with:
name: artifact
path: asteroids
- name: Set current datetime
id: set_datetime
run: echo "datetime=$(date +"%Y%m%d%H%M%S")" >> "$GITHUB_OUTPUT"
- name: Create ZIP
run: |
cd ./asteroids
mkdir ./asteroids
tar -xvf ./artifact.tar -C ./asteroids
zip -r ../asteroids-v${{ steps.set_datetime.outputs.datetime }}.zip ./asteroids/
zip -r ../asteroids-v${{ needs.build.outputs.datetime}}.zip ./asteroids/
- name: Create Release
id: create_release
id: [build, create_release]
uses: ncipollo/release-action@v1
with:
artifacts: "./asteroids-v${{ steps.set_datetime.outputs.datetime }}.zip"
artifacts: "./asteroids-v${{ needs.build.outputs.datetime }}.zip"
artifactContentType: application/zip
body: |
**Asteroids Game - _Prerelease v${{ steps.set_datetime.outputs.datetime }}_**
**Asteroids Game - _Prerelease v${{ needs.build.outputs.datetime }}_**
${{ github.event.head_commit.message }}
prerelease: true
draft: false
commit: ${{ github.head_ref }}
tag: v${{ steps.set_datetime.outputs.datetime }}
tag: v${{ needs.build.outputs.datetime }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e10f081

Please sign in to comment.