Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Publish release on arduino download servers #570
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 | ||
umbynos
Nov 25, 2020
Author
Collaborator
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
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 | ||
umbynos
Nov 25, 2020
Author
Collaborator
Unfortunately the trick of using $GITHUB_ENV
do not work between different jobs
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 | ||
umbynos
Nov 25, 2020
Author
Collaborator
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)
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 "*" |
umbynos
Nov 25, 2020
Author
Collaborator
The files are uploaded to https://downloads.arduino.cc/tmp/CreateBridgeStable/<filename>
The files are uploaded to https://downloads.arduino.cc/tmp/CreateBridgeStable/<filename>
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