Skip to content

Commit 8ac92b3

Browse files
committed
add release step
1 parent 15aa3a5 commit 8ac92b3

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,3 +324,61 @@ jobs:
324324
name: ArduinoCreateAgent-osx
325325
path: ArduinoCreateAgent*.tar
326326
if-no-files-found: error
327+
328+
create-release:
329+
runs-on: ubuntu-latest
330+
needs: code-sign-mac-installers
331+
332+
steps:
333+
334+
- name: Download artifact
335+
uses: actions/download-artifact@v2
336+
with:
337+
name: ArduinoCreateAgent-* # download all the archives containing installers
338+
path: ArduinoCreateAgent
339+
340+
# - name: Read CHANGELOG
341+
# id: changelog
342+
# run: |
343+
# body=$(cat dist/CHANGELOG.md)
344+
# body="${body//'%'/'%25'}"
345+
# body="${body//$'\n'/'%0A'}"
346+
# body="${body//$'\r'/'%0D'}"
347+
# echo $body
348+
# echo "::set-output name=BODY::$body"
349+
350+
# - name: Identify Prerelease
351+
# # This is a workaround while waiting for create-release action
352+
# # to implement auto pre-release based on tag
353+
# id: prerelease
354+
# run: |
355+
# wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.0.0.zip
356+
# unzip -p /tmp/3.0.0.zip semver-tool-3.0.0/src/semver >/tmp/semver && chmod +x /tmp/semver
357+
# if [[ $(/tmp/semver get prerel ${GITHUB_REF/refs\/tags\//}) ]]; then echo "::set-output name=IS_PRE::true"; fi
358+
359+
- name: Create Github Release
360+
uses: actions/create-release@v1
361+
with:
362+
tag_name: ${{ github.ref }}
363+
release_name: ${{ github.ref }}
364+
draft: true # only for test
365+
prerelease: true # see later how to handle this (maybe just a check on "-dev" will be sufficient)
366+
body: "THIS IS A TEST RELEASE"
367+
368+
- name: Upload release files on Github
369+
uses: svenstaro/upload-release-action@v2
370+
with:
371+
repo_token: ${{ secrets.GITHUB_TOKEN }}
372+
tag: ${{ github.ref }}
373+
file_glob: true # If set to true, the file argument can be a glob pattern
374+
file: ArduinoCreateAgent/*
375+
376+
# - name: Upload release files on Arduino downloads servers
377+
# uses: docker://plugins/s3
378+
# env:
379+
# PLUGIN_SOURCE: "dist/*"
380+
# PLUGIN_TARGET: "/arduino-cli/"
381+
# PLUGIN_STRIP_PREFIX: "dist/"
382+
# PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
383+
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
384+
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

0 commit comments

Comments
 (0)