Skip to content

Adds support to generate kubernetes or cos backend logic (#312) #287

Adds support to generate kubernetes or cos backend logic (#312)

Adds support to generate kubernetes or cos backend logic (#312) #287

Workflow file for this run

name: Release
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Verify
run: |
npm ci
npm test
npm run build
publish:
needs: verify
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Setup directory
run: |
mkdir -p public
cp install.sh public
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: iascable.cloudnativetoolkit.dev
release:
needs: verify
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
# Drafts your next Release notes as Pull Requests are merged into "main"
- name: Create release
id: create-release
uses: release-drafter/release-drafter@v6
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
config-name: release-drafter.yaml
publish: false
prerelease: false
filter-by-commitish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: '16'
- name: Update package.json
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
npm version ${{ steps.create-release.outputs.tag_name }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish release
id: publish-release
uses: release-drafter/release-drafter@v6
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
config-name: release-drafter.yaml
publish: true
prerelease: false
filter-by-commitish: true
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}