release #835
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
#on: [workflow_dispatch] | |
jobs: | |
build_release: | |
runs-on: windows-latest | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v2 | |
# with: | |
## persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
# fetch-depth: 0 | |
- name: Install AU | |
run: Install-Module au -Force | |
- name: Update Template | |
id: update_template | |
working-directory: twingate | |
run: .\update.ps1 | |
# - name: Verify Changed files | |
# uses: tj-actions/verify-changed-files@v18 | |
# id: verify-changed-files | |
# with: | |
# files: twingate.nuspec | |
- name: Verify Changed files | |
uses: tj-actions/verify-changed-files@v18 | |
id: verify-changed-files | |
with: | |
files: | | |
twingate/twingate.nuspec | |
- name: Run step only when any of the above files change. | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
env: | |
CHANGED_FILES: ${{ steps.verify-changed-files.outputs.changed_files }} | |
run: | | |
echo "Changed files: $CHANGED_FILES" | |
- name: GIT Commit | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
run: | | |
git config --global user.name ${{ secrets.USERNAME }} | |
git config --global user.email ${{ secrets.EMAIL }} | |
git add twingate/twingate.nuspec | |
git commit -m "Github Workflow Update" | |
- name: Push Changes | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
- name: Choco Package | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: pack twingate/twingate.nuspec | |
- name: Choco Push | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: push --source https://push.chocolatey.org/ -k ${{ secrets.CHOCO_API_KEY }} | |
# - run: | | |
# dir | |
# - name: workingdirectory | |
# working-directory: twingate | |
# run: | | |
# dir | |
# type twingate.nuspec |