Skip to content

ci(deps): bump actions/checkout from 4.1.7 to 4.2.0 #588

ci(deps): bump actions/checkout from 4.1.7 to 4.2.0

ci(deps): bump actions/checkout from 4.1.7 to 4.2.0 #588

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@d632683dd7b4114ad314bca15554477dd762a938
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.401
- 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@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: release
path: release/
build-android:
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
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.401
- 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@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
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@d632683dd7b4114ad314bca15554477dd762a938
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@920cbb300dcd3f0568dbc42700c61e2fd9e6139c
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@d632683dd7b4114ad314bca15554477dd762a938
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@920cbb300dcd3f0568dbc42700c61e2fd9e6139c
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@d632683dd7b4114ad314bca15554477dd762a938
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