Skip to content

Move tag continuous #186

Move tag continuous

Move tag continuous #186

# This is a basic workflow to help you get started with Actions
name: Move tag continuous
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
# run this every friday at 13:37 UTC
- cron: '37 13 * * 5'
jobs:
move_it:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Move continuous tag
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
try {
await github.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "tags/continuous"
})
} catch (e) {
console.log("Tag 'continuous' does not exist yet? Error: " + e)
}
await github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/continuous",
sha: context.sha
})
# add to continuous release
- uses: "ncipollo/release-action@v1"
with:
tag: "continuous"
name: "Continuous release"
prerelease: false
draft: false
bodyFile: .github/AUTORELEASE.md
allowUpdates: true