Skip to content

Commit 292fbd3

Browse files
committed
ci: Greenlight MELPA releases after successfully publishing binaries
1 parent 123bb8b commit 292fbd3

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,29 @@ jobs:
152152
- run: bin/setup
153153

154154
- run: bin/test integ
155+
156+
publish-melpa:
157+
needs: integ
158+
runs-on: ubuntu-18.04
159+
steps:
160+
- name: Set release version
161+
run: |
162+
echo "RELEASE_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
163+
164+
- name: Greenlight releasing to MELPA
165+
run: |
166+
git push origin ${{ env.RELEASE_VERSION }}:refs/heads/release
167+
continue-on-error: true
168+
169+
# We don't want this to trigger workflows, so we don't use a personal access token.
170+
- name: Greenlight releasing to MELPA Stable
171+
uses: actions/github-script@v4
172+
with:
173+
script: |
174+
github.git.createRef({
175+
owner: context.repo.owner,
176+
repo: context.repo.repo,
177+
ref: "refs/tags/melpa-stable/v${{ env.RELEASE_VERSION }}",
178+
sha: context.sha
179+
})
180+
continue-on-error: true

0 commit comments

Comments
 (0)