Skip to content

ci(deps): Bump actions/upload-artifact from 4.3.4 to 4.3.6 #577

ci(deps): Bump actions/upload-artifact from 4.3.4 to 4.3.6

ci(deps): Bump actions/upload-artifact from 4.3.4 to 4.3.6 #577

Workflow file for this run

name: actions
on:
push:
paths-ignore:
- README.md
- LICENSE.md
- 'docs/**'
- '.github/workflows/codeql-analysis.yaml'
branches:
- root
pull_request:
paths-ignore:
- README.md
- LICENSE.md
- 'docs/**'
- '.github/workflows/codeql-analysis.yaml'
workflow_dispatch:
jobs:
build-website:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: Get version
id: jjversion
uses: jjliggett/jjversion-action@cfcf89e966cb0ba4a32db8cb8565733a3c469956
- name: Display jjversion outputs
run: |
echo "Major: ${{ steps.jjversion.outputs.major }}"
echo "Minor: ${{ steps.jjversion.outputs.minor }}"
echo "Patch: ${{ steps.jjversion.outputs.patch }}"
echo "MajorMinorPatch: ${{ steps.jjversion.outputs.majorMinorPatch }}"
echo "Sha: ${{ steps.jjversion.outputs.sha }}"
echo "ShortSha: ${{ steps.jjversion.outputs.shortSha }}"
- name: Setup .NET
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee
with:
dotnet-version: 8.0.303
- name: Restore dependencies
run: dotnet restore --locked-mode CurrentTimeApp/CurrentTimeApp.csproj
- name: Build
run: dotnet build -c Release --no-restore CurrentTimeApp/CurrentTimeApp.csproj
- name: Test
run: dotnet test --no-build --verbosity normal CurrentTimeApp/CurrentTimeApp.csproj
- name: Publish application
run: dotnet publish --no-restore --no-build -c Release -o release CurrentTimeApp/CurrentTimeApp.csproj
- name: Change index.html base href from / to CurrentTimeApp for GitHub Pages
run: sed -i 's/<base href="\/"/<base href="\/CurrentTimeApp\/"/g' release/wwwroot/index.html
- run: cat release/wwwroot/index.html
- name: Add .nojekyll as this is not a Jekyll project, to allow files and folders starting with underscores
run: touch release/wwwroot/.nojekyll
- run: cp release/wwwroot/index.html release/wwwroot/404.html
- name: Upload release.zip
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: release
path: release/
build-android:
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: Get version
id: jjversion
uses: jjliggett/jjversion-action@cfcf89e966cb0ba4a32db8cb8565733a3c469956
- name: Display jjversion outputs
run: |
echo "Major: ${{ steps.jjversion.outputs.major }}"
echo "Minor: ${{ steps.jjversion.outputs.minor }}"
echo "Patch: ${{ steps.jjversion.outputs.patch }}"
echo "MajorMinorPatch: ${{ steps.jjversion.outputs.majorMinorPatch }}"
echo "Sha: ${{ steps.jjversion.outputs.sha }}"
echo "ShortSha: ${{ steps.jjversion.outputs.shortSha }}"
- name: Setup .NET
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee
with:
dotnet-version: 8.0.303
- name: Install dotnet maui workload
run: dotnet workload install maui --source https://api.nuget.org/v3/index.json
- name: Install dotnet maui-android workload to build application
run: dotnet workload restore CurrentTimeApp.MauiBlazor/CurrentTimeApp.MauiBlazor.csproj
- name: Restore dependencies
run: dotnet restore --locked-mode CurrentTimeApp.MauiBlazor/CurrentTimeApp.MauiBlazor.csproj
- name: Build
run: dotnet build -c Release --no-restore -f net8.0-android CurrentTimeApp.MauiBlazor/CurrentTimeApp.MauiBlazor.csproj
- name: Test
run: dotnet test --no-build --verbosity normal -f net8.0-android CurrentTimeApp.MauiBlazor/CurrentTimeApp.MauiBlazor.csproj
- name: Publish application
run: dotnet publish --no-restore -c Release -o android-release -f net8.0-android CurrentTimeApp.MauiBlazor/CurrentTimeApp.MauiBlazor.csproj
- run: ls -R
- name: Upload release.zip
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: android-release
path: android-release/
deploy-website-develop:
runs-on: ubuntu-latest
needs: build-website
environment:
name: development
url: https://jjliggett.github.io/CurrentTimeApp-dev-env/
if: ${{ github.ref != 'refs/heads/root' }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: Download build
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: release
path: release/
- name: Change index.html base href from CurrentTimeApp to CurrentTimeApp-dev-env for GitHub Pages
run: sed -i 's/<base href="\/CurrentTimeApp\/"/<base href="\/CurrentTimeApp-dev-env\/"/g' release/wwwroot/index.html
- run: ls -R
- name: Publish application to GitHub Pages
uses: JamesIves/github-pages-deploy-action@94f3c658273cf92fb48ef99e5fbc02bd2dc642b2
with:
repository-name: jjliggett/CurrentTimeApp-dev-env
token: ${{ secrets.DEV_PAT_TOKEN }}
branch: gh-pages
folder: release/wwwroot
git-config-name: jjliggett
git-config-email: 67353173+jjliggett@users.noreply.github.com
single-commit: true
deploy-website-production:
runs-on: ubuntu-latest
needs: build-website
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: Download build
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: release
path: release/
- run: ls -R
- name: Publish application to GitHub Pages
uses: JamesIves/github-pages-deploy-action@94f3c658273cf92fb48ef99e5fbc02bd2dc642b2
if: ${{ github.ref == 'refs/heads/root' }}
with:
token: ${{ secrets.PROD_PAT_TOKEN }}
branch: gh-pages
folder: release/wwwroot
git-config-name: jjliggett
git-config-email: 67353173+jjliggett@users.noreply.github.com
deploy-release:
runs-on: ubuntu-latest
needs:
- build-android
- deploy-website-production
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: Get version
id: jjversion
uses: jjliggett/jjversion-action@cfcf89e966cb0ba4a32db8cb8565733a3c469956
- name: Display jjversion outputs
run: |
echo "Major: ${{ steps.jjversion.outputs.major }}"
echo "Minor: ${{ steps.jjversion.outputs.minor }}"
echo "Patch: ${{ steps.jjversion.outputs.patch }}"
echo "MajorMinorPatch: ${{ steps.jjversion.outputs.majorMinorPatch }}"
echo "Sha: ${{ steps.jjversion.outputs.sha }}"
echo "ShortSha: ${{ steps.jjversion.outputs.shortSha }}"
- run: git reset --soft HEAD~1
- name: Get previous version from previous commit
id: previousversion
uses: jjliggett/jjversion-action@cfcf89e966cb0ba4a32db8cb8565733a3c469956
- run: echo "VERSION=$(echo ${{ steps.jjversion.outputs.majorMinorPatch }})" >> $GITHUB_ENV
- run: echo "PREVIOUS_COMMIT_VERSION=$(echo ${{ steps.previousversion.outputs.majorMinorPatch }})" >> $GITHUB_ENV
- name: Download build
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: android-release
path: android-release/
- run: ls -R
- name: Create GitHub release
uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0
if: ${{ github.ref == 'refs/heads/root' && env.VERSION != env.PREVIOUS_COMMIT_VERSION }}
with:
repo_token: ${{ secrets.PROD_PAT_TOKEN }}
automatic_release_tag: v${{ env.VERSION }}
prerelease: false
files: |
android-release/com.jjliggett.currenttimeapp.mauiblazor-Signed.apk
README.md
LICENSE.md