Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
dbones committed Oct 20, 2024
1 parent 8d3cc98 commit 4e52ccb
Show file tree
Hide file tree
Showing 21 changed files with 1,076 additions and 1,076 deletions.
232 changes: 116 additions & 116 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,116 +1,116 @@
version: 2.1

jobs:

setup:
docker:
- image: dboneslabs/tools-docker-gittools:latest
steps:
- checkout
- run:
name: version
command: |
mkdir semver
dotnet-gitversion
dotnet-gitversion | jq '.BranchName' > ./semver/branch.txt
dotnet-gitversion | jq '.SemVer' > ./semver/full.txt
dotnet-gitversion | jq '.NuGetVersionV2' > ./semver/nuget.txt
dotnet-gitversion | jq '.NuGetPreReleaseTagV2' > ./semver/nuget-sfx.txt
dotnet-gitversion | jq '.MajorMinorPatch' > ./semver/mmp.txt
export BRANCH=$(cat ./semver/branch.txt)
echo $BRANCH
export V=\"$(git describe --tags --abbrev=0)\"
echo $V
cp ./semver/nuget.txt ./semver/version.txt
if [[ $BRANCH == "\"(no branch)\"" ]]; then echo "tagged release"; echo $V > ./semver/version.txt; fi;
cat ./semver/version.txt
ls
ls ./semver
- persist_to_workspace:
root: .
paths:
- src
- semver

build:
docker:
- image: mcr.microsoft.com/dotnet/sdk:5.0
steps:
- attach_workspace:
at: ./
- run:
name: build
command: |
ls
ls ./semver
APP_VERSION=$(cat ./semver/version.txt)
echo $APP_VERSION
cd ./src
ls
dotnet restore Template.proj
dotnet pack Template.proj --no-build --no-dependencies --no-restore --force -p:Version=$APP_VERSION
mkdir ./../nupkgs
mv ./bin/**/*.nupkg ./../nupkgs
cd ./../nupkgs
pwd
ls
- persist_to_workspace:
root: .
paths:
- nupkgs
- src

publish:
docker:
- image: mcr.microsoft.com/dotnet/sdk:5.0
steps:
- attach_workspace:
at: ./
- run: |
pwd
cd nupkgs
ls
dotnet nuget add source https://nuget.pkg.github.com/dbones-labs/index.json -n github -u dbones -p ${GH_TOKEN} --store-password-in-clear-text
dotnet nuget push "*.nupkg" --source "github"
workflows:
version: 2

build_and_publish:
jobs:
- setup:
filters:
branches:
ignore:
- docs
tags:
only: /^v?\d\.\d\.\d/
- build:
filters:
tags:
only: /^v?\d\.\d\.\d/
requires:
- setup
- publish:
context: build-ctx
filters:
tags:
only: /^v?\d\.\d\.\d/
requires:
- build
version: 2.1

jobs:

setup:
docker:
- image: dboneslabs/tools-docker-gittools:latest
steps:
- checkout
- run:
name: version
command: |
mkdir semver
dotnet-gitversion
dotnet-gitversion | jq '.BranchName' > ./semver/branch.txt
dotnet-gitversion | jq '.SemVer' > ./semver/full.txt
dotnet-gitversion | jq '.NuGetVersionV2' > ./semver/nuget.txt
dotnet-gitversion | jq '.NuGetPreReleaseTagV2' > ./semver/nuget-sfx.txt
dotnet-gitversion | jq '.MajorMinorPatch' > ./semver/mmp.txt
export BRANCH=$(cat ./semver/branch.txt)
echo $BRANCH
export V=\"$(git describe --tags --abbrev=0)\"
echo $V
cp ./semver/nuget.txt ./semver/version.txt
if [[ $BRANCH == "\"(no branch)\"" ]]; then echo "tagged release"; echo $V > ./semver/version.txt; fi;
cat ./semver/version.txt
ls
ls ./semver
- persist_to_workspace:
root: .
paths:
- src
- semver

build:
docker:
- image: mcr.microsoft.com/dotnet/sdk:5.0
steps:
- attach_workspace:
at: ./
- run:
name: build
command: |
ls
ls ./semver
APP_VERSION=$(cat ./semver/version.txt)
echo $APP_VERSION
cd ./src
ls
dotnet restore Template.proj
dotnet pack Template.proj --no-build --no-dependencies --no-restore --force -p:Version=$APP_VERSION
mkdir ./../nupkgs
mv ./bin/**/*.nupkg ./../nupkgs
cd ./../nupkgs
pwd
ls
- persist_to_workspace:
root: .
paths:
- nupkgs
- src

publish:
docker:
- image: mcr.microsoft.com/dotnet/sdk:5.0
steps:
- attach_workspace:
at: ./
- run: |
pwd
cd nupkgs
ls
dotnet nuget add source https://nuget.pkg.github.com/dbones-labs/index.json -n github -u dbones -p ${GH_TOKEN} --store-password-in-clear-text
dotnet nuget push "*.nupkg" --source "github"
workflows:
version: 2

build_and_publish:
jobs:
- setup:
filters:
branches:
ignore:
- docs
tags:
only: /^v?\d\.\d\.\d/
- build:
filters:
tags:
only: /^v?\d\.\d\.\d/
requires:
- setup
- publish:
context: build-ctx
filters:
tags:
only: /^v?\d\.\d\.\d/
requires:
- build
34 changes: 17 additions & 17 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: releases
on:
milestone:
types: [closed]
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Create a release draft for a milestone
id: create-release-milestone
uses: ecampidoglio/auto-release-milestone@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Print the URL of the release draft
if: steps.create-release-milestone.outputs.release-url != ''
run: echo ${{ steps.create-release-draft.outputs.release-url }}
name: releases
on:
milestone:
types: [closed]
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Create a release draft for a milestone
id: create-release-milestone
uses: ecampidoglio/auto-release-milestone@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Print the URL of the release draft
if: steps.create-release-milestone.outputs.release-url != ''
run: echo ${{ steps.create-release-draft.outputs.release-url }}
38 changes: 19 additions & 19 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

.vs/
obj/
bin/
*.user

.vs/
obj/
bin/
*.user
Loading

0 comments on commit 4e52ccb

Please sign in to comment.