Merge pull request #63 from aziontech/feat/presets #71
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: | |
push: | |
branches: | |
- main | |
- stage | |
permissions: write-all | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Install | |
run: npm install | |
- name: Change CLI bin | |
run: | | |
rm -rf ./bin/azion | |
touch ./bin/azion | |
- name: Build | |
run: npm run compile | |
- name: Release | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
sync-stage: | |
needs: release | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
- name: Set up Git | |
run: | | |
git config user.name "GitHub Action" | |
git config user.email "[email protected]" | |
- name: Merge main into stage | |
run: | | |
git fetch origin | |
git pull origin main | |
git checkout stage | |
git merge main --allow-unrelated-histories --no-edit -Xtheirs -m "Merge branch 'main' into stage [skip ci]" | |
git push origin stage |