-
-
Notifications
You must be signed in to change notification settings - Fork 150
Publish release on arduino download servers #570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
just like the arduino-cli does
comment github release for testing purposes only
do not use drone.io docker container anymore, use aws cli instead (already installed on github runners)
This was failing because aws credentials are not suited for this bucket
Only temporarily (to make 1.1 release)
# workaround to strip bugfix number from semver (only to make 1.1 release) I will change this in the future | ||
- name: Set version env vars | ||
# VERSION will be available only in the next step | ||
run: | | ||
echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
|
||
- name: Set installer env vars | ||
run: | | ||
echo INSTALLER_VARS="project.outputDirectory=$PWD project.version=${VERSION%.*} workspace=$PWD realname=Arduino_Create_Bridge" >> $GITHUB_ENV | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of this workaround is to consider only major.minor
in the string used in the name of the installer. Without this and by using only GITHUB_REF##*/
the result will be something like 1.1.251
instead of the desired 1.1
The >> $GITHUB_ENV
trick is used because in not possible to use an env variable defined inside env
inside the same environment
# workaround to strip bugfix number from semver (only to make 1.1 release) I will change this in the future | ||
- name: Set version env vars | ||
# VERSION will be available only in the next step | ||
run: | | ||
echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately the trick of using $GITHUB_ENV
do not work between different jobs
- name: Identify Prerelease | ||
# This is a workaround while waiting for create-release action to implement auto pre-release based on tag | ||
id: prerelease | ||
run: | | ||
wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.1.0.zip | ||
unzip -p /tmp/3.1.0.zip semver-tool-3.1.0/src/semver >/tmp/semver && chmod +x /tmp/semver | ||
if [[ $(/tmp/semver get prerel ${GITHUB_REF/refs\/tags\//}) ]]; then echo "::set-output name=IS_PRE::true"; fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just like in the arduino-cli this step is useful to check if a release is actually a prerelease based on the tag (1.2.0-dev
and 1.2.0-rc1
are both considered prereleases)
@@ -361,3 +390,7 @@ jobs: | |||
tag: ${{ github.ref }} | |||
file_glob: true # If set to true, the file argument can be a glob pattern | |||
file: release/* | |||
|
|||
- name: Upload release files on Arduino downloads servers | |||
run: aws s3 sync release/ s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.PLUGIN_TARGET }} --include "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The files are uploaded to https://downloads.arduino.cc/tmp/CreateBridgeStable/<filename>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
just like the arduino-cli does
Please check if the PR fulfills these requirements
before creating one)
feature
Add steps to the
release.yml
workflow:nope