Skip to content

Bump actions/checkout from 3 to 4 #3

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #3

Workflow file for this run

name: "build-test (old)"
on: # rebuild any PRs and main branch changes
pull_request:
branches: [main]
push:
branches:
- main
- "releases/*"
paths:
- "src/**"
- "package.json"
jobs:
Build: # make sure build/ci work properly
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node: ["18"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # 0 indicates all history for all branches and tags
- name: GitVersion
id: gitversion # step id used as reference for output values
uses: roryprimrose/rungitversion@v1
- name: Output version values
run: |
# These are also available as environment variables, e.g. GitVersion_Major, or GitVersion_NuGetVersionV2
echo "Major: ${{ steps.gitversion.outputs.Major }}"
echo "Minor: ${{ steps.gitversion.outputs.Minor }}"
echo "Patch: ${{ steps.gitversion.outputs.Patch }}"
echo "PreReleaseTag: ${{ steps.gitversion.outputs.PreReleaseTag }}"
echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.PreReleaseTagWithDash }}"
echo "PreReleaseLabel: ${{ steps.gitversion.outputs.PreReleaseLabel }}"
echo "PreReleaseNumber: ${{ steps.gitversion.outputs.PreReleaseNumber }}"
echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.WeightedPreReleaseNumber }}"
echo "BuildMetaData: ${{ steps.gitversion.outputs.BuildMetaData }}"
echo "BuildMetaDataPadded: ${{ steps.gitversion.outputs.BuildMetaDataPadded }}"
echo "FullBuildMetaData: ${{ steps.gitversion.outputs.FullBuildMetaData }}"
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.MajorMinorPatch }}"
echo "SemVer: ${{ steps.gitversion.outputs.SemVer }}"
echo "LegacySemVer: ${{ steps.gitversion.outputs.LegacySemVer }}"
echo "LegacySemVerPadded: ${{ steps.gitversion.outputs.LegacySemVerPadded }}"
echo "AssemblySemVer: ${{ steps.gitversion.outputs.AssemblySemVer }}"
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.AssemblySemFileVer }}"
echo "FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}"
echo "InformationalVersion: ${{ steps.gitversion.outputs.InformationalVersion }}"
echo "BranchName: ${{ steps.gitversion.outputs.BranchName }}"
echo "Sha: ${{ steps.gitversion.outputs.Sha }}"
echo "ShortSha: ${{ steps.gitversion.outputs.ShortSha }}"
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.NuGetVersionV2 }}"
echo "NuGetVersion: ${{ steps.gitversion.outputs.NuGetVersion }}"
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.NuGetPreReleaseTagV2 }}"
echo "NuGetPreReleaseTag: ${{ steps.gitversion.outputs.NuGetPreReleaseTag }}"
echo "VersionSourceSha: ${{ steps.gitversion.outputs.VersionSourceSha }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}"
echo "CommitDate: ${{ steps.gitversion.outputs.CommitDate }}"
- name: Setup node v${{ matrix.node }}
uses: actions/setup-node@v4 # https://github.com/actions/setup-node
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install npm@latest
run: |
sudo npm install --global npm@latest
- name: Install dependencies
run: |
npm install
- name: Output Relabeler semantic version
run: |
echo $GitVersion_NuGetVersionV2
- run: |
npm run all
Test: # run just the tests
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node: ["18"]
steps:
- uses: actions/checkout@v4
- name: Setup node v${{ matrix.node }}
uses: actions/setup-node@v4 # https://github.com/actions/setup-node
with:
node-version: ${{ matrix.node }}
cache: npm
- run: |
sudo npm install --global npm@latest
npm install
- run: npm run build
- run: npm test
# Make sure the action works on a clean machine without building.
# This should be run on branches Releases/* in the future and
# 'build run package' should have been run prior.
Execute:
name: Execute
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node: ["18"]
steps:
- name: Checkout repository code
uses: actions/checkout@v4
- name: Setup node v${{ matrix.node }}
uses: actions/setup-node@v4 # https://github.com/actions/setup-node
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install npm@latest
run: |
sudo npm install --global npm@latest
- name: Install dependencies
run: |
npm install
- name: Build & Package
run: |
npm run build
npm run package
- name: Execute action Relabeler
uses: ./
with:
milliseconds: 1200
repositoryToken: ${{ secrets.GITHUB_TOKEN }}