11name : CD
22on :
3+ push :
4+ branches :
5+ - main
36 # When Pull Request is merged
4- pull_request_target :
5- types : [closed]
7+ # pull_request_target:
8+ # types: [closed]
69
710jobs :
811 GetVersion :
912 runs-on : ubuntu-latest
1013 timeout-minutes : 60
1114 outputs :
1215 version : ${{ env.RELEASE_VERSION }}
13- if : |
14- github.event.pull_request.user.login == 'polywrap-build-bot' &&
15- github.event.pull_request.merged == true
16+ # if: |
17+ # github.event.pull_request.user.login == 'polywrap-build-bot' &&
18+ # github.event.pull_request.merged == true
1619 steps :
1720 - name : Checkout code
1821 uses : actions/checkout@v2
19- - name : Halt release if CI failed
20- run : exit 1
21- if : ${{ github.event.workflow_run.conclusion == 'failure' }}
22+ # - name: Halt release if CI failed
23+ # run: exit 1
24+ # if: ${{ github.event.workflow_run.conclusion == 'failure' }}
2225 - name : Read VERSION into env.RELEASE_VERSION
2326 run : echo RELEASE_VERSION=$(cat VERSION) >> $GITHUB_ENV
2427 - name : Check if tag Exists
@@ -65,19 +68,25 @@ jobs:
6568 prerelease : false
6669
6770 Dev-PR :
68- needs : Pre-Check
71+ needs :
72+ - GetVersion
6973 runs-on : ubuntu-latest
7074 steps :
7175 - name : Checkout
7276 uses : actions/checkout@v3
7377 with :
7478 ref : dev
79+ fetch-depth : 0
7580
76- - name : Merge main into dev
81+ - name : Set Git Identity
7782 run : |
7883 git config --global user.name '${{env.BUILD_BOT}}'
79- git config --global user.email '${{ env.BUILD_BOT }}@users.noreply.github.com'
80- git merge main
84+ git config --global user.email '${{env.BUILD_BOT}}@users.noreply.github.com'
85+ env :
86+ GITHUB_TOKEN : ${{ secrets.POLYWRAP_BUILD_BOT_PAT }}
87+
88+ - name : Merge main into dev
89+ run : git merge origin/main
8190
8291 - name : set env.RELEASE_FORKS to Release Forks' Organization
8392 run : echo RELEASE_FORKS=polywrap-release-forks >> $GITHUB_ENV
@@ -88,59 +97,31 @@ jobs:
8897 - name : Read VERSION into env.RELEASE_VERSION
8998 run : echo RELEASE_VERSION=$(cat VERSION) >> $GITHUB_ENV
9099
91- - name : Building Dev PR...
92- uses : actions/github-script@0.8.0
93- with :
94- github-token : ${{secrets.GITHUB_TOKEN}}
95- script : |
96- github.issues.createComment({
97- issue_number: context.issue.number,
98- owner: context.repo.owner,
99- repo: context.repo.repo,
100- body: '[Building Dev PR](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}) after Version (`${{env.RELEASE_VERSION}}`) Release.'
101- })
102-
103- - name : Set up Python 3.10
104- uses : actions/setup-python@v4
105- with :
106- python-version : " 3.10"
100+ # - name: Set up Python 3.10
101+ # uses: actions/setup-python@v4
102+ # with:
103+ # python-version: "3.10"
107104
108- - name : Install tomlkit
109- run : pip3 install tomlkit
105+ # - name: Install poetry
106+ # run: curl -sSL https:// install.python-poetry.org | python3 -
110107
111- - name : Set Git Identity
112- run : |
113- git config --global user.name '${{env.BUILD_BOT}}'
114- git config --global user.email '${{env.BUILD_BOT}}@users.noreply.github.com'
115- env :
116- GITHUB_TOKEN : ${{ secrets.POLYWRAP_BUILD_BOT_PAT }}
108+ # - name: Install tomlkit
109+ # run: pip3 install tomlkit
117110
118- - name : Link Packages in dev branch
119- run : python3 scripts/link_packages.py
111+ # - name: Link Packages in dev branch
112+ # run: python3 scripts/link_packages.py
120113
121114 - name : Create Pull Request
122115 id : cpr
123116 uses : peter-evans/create-pull-request@v3
124117 with :
125118 token : ${{ secrets.POLYWRAP_BUILD_BOT_PAT }}
126119 push-to-fork : ${{env.RELEASE_FORKS}}/${{github.event.pull_request.base.repo.name}}
127- branch : release/origin-dev -${{env.RELEASE_VERSION}}
128- base : dev
120+ # branch: post- release/origin-${{env.RELEASE_VERSION}}
121+ # base: origin/ dev
129122 committer : GitHub <noreply@github.com>
130123 author : ${{env.BUILD_BOT}} <${{env.BUILD_BOT}}@users.noreply.github.com>
131- commit-message : " ${{env.RELEASE_VERSION}}"
124+ commit-message : " DEV ${{env.RELEASE_VERSION}}"
132125 title : ' Link packages in dev after (${{env.RELEASE_VERSION}})'
133126 body : |
134127 ## Link packages in dev after (${{env.RELEASE_VERSION}})
135-
136- - name : Release PR Created...
137- uses : actions/github-script@0.8.0
138- with :
139- github-token : ${{secrets.GITHUB_TOKEN}}
140- script : |
141- github.issues.createComment({
142- issue_number: context.issue.number,
143- owner: context.repo.owner,
144- repo: context.repo.repo,
145- body: '**[Release PR Created](https://github.com/${{github.repository}}/pull/${{ steps.cpr.outputs.pull-request-number }}) (`${{env.RELEASE_VERSION}}`)**'
146- })
0 commit comments